Auto wrap markup test

NB regex needs updating for this to work properly with linebreaks
added autoEdit option