2898 - WikiCreole code block handling is too fragile

The code block handling seems to be very fragile, apparently no matter which markup you choose (with the sole exception of "Markdown"). This seems to boil down to WikiCreole's code block handling methods, since the other markdown choices are effectively layered on top of it.

For example, this is a very simple and basic code block which fails to parse correctly in WikiCreole, as you can see:

<<code>># Testing blah blah

  1. More testing<</code>>

Each line of code above starts with a "#", commonly used in many scripting languages to denote a comment line, and yet WikiCreole ignores the code block and parses the contents such that the "#" indicates a numbered list entry. If you remove the "#" from each line, it parses fine. The same block as above with those removed:

 Testing blah blah
 More testing

It even breaks when you simply have a blank line in the code block, like so:



Here's the same code block without the extra blank line, which works fine:


The only way to post most blocks of code without running into this problem is to use "Markdown" as your mark-up type for the entire post.

Related ticket:
I'm re-posting a new ticket for this since the one above is pointing to the wrong component and doesn't fully summarize the problem.

User When Change
Torhal Jul 24, 2013 at 20:07 UTC Changed status from Accepted to Declined
Torhal Nov 09, 2011 at 16:43 UTC Changed status from New to Accepted
Brettflan Oct 15, 2011 at 10:14 UTC Create

You must login to post a comment. Don't have an account? Register to get one!


Last updated
Jul 24, 2013
Oct 15, 2011
Declined - We decided not to take action on this ticket.
Defect - A shortcoming, fault, or imperfection
Medium - Normal priority.

Reported by

Possible assignees