[dokuwiki] Re: Hacking to recognise line break?

Terence J. Grant wrote:
Hi Chris,

This plugin looks like it has the potential to fix a problem I've been
having with quoting in wiki pages (currently multiline quotes get
single-lined and you have to force newlines with double backslash);
but I've found a problem with the plugin already (sorry.)

This is more complex. A single new line is the exit from the quote syntax mode.

My previously mentioned change to the sort order will fix the mangling of the quote mode.

To allow single line breaks within the quote mode, put the sort order back to 100 and modify the pattern to be
'(?<!^|\n)\n(?!\n|>)'


The sort mode at 100 means the linebreak plugin will catch the newlines before the quote gets them - so it won't exit its mode. The change to the pattern means the linebreak plugin won't start if the first character on a line is ">". You'll need two new lines to exit the quote mode - this works as the linebreak plugin only captures single linebreaks.

Cheers,

Chris
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: