Summary: Markup doesn't work as expected
Created: 2016-12-29 20:56
Status: Closed, added for 2.2.98
Category: Bug
From: simon
Priority: 1
Version: current
OS: n/a










Please enable bold markup on this page to see issue[1]

I.e. '*test*''''ing''' is not correctly parsed.

simon December 29, 2016, at 09:02 PM

This is caused by the order of markup processing: when '''bold''' is processed, the first 3 apostrophes are consumed thus breaking the left-adjacent markup rule. You could make the '*bold*' rule processed before ''' (and ''''') in the markup definition Markup("'*", "<'''''", "/'\\*(.*?)\\*'/", "<b>$1</b>"); # '*bold*'. There will always be someone unhappy when a punctuation can, by its definition, be interpreted in more than one way, and the PHP interpreter chose the other way. (It didn't really choose it, it was instructed to do exactly this.) Do you request that this rule be changed in sample-config.php? I'd rather remove these examples, there is already core markup for bold and italics, multiplying it only confuses people. --Petko

Well, it appears that the "<'''''" setting fixes this, I'll just change it in the sample-config.php file. --Petko May 31, 2017, at 04:39 AM