CurseForge

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:

<<code>>doSomething();

doSomethingElse();<</code>>


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

doSomething();
doSomethingElse();


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:
http://www.curseforge.com/projects/curseforge/tickets/2725-ticket-markup-ignored-and-broken/
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
Torhal Nov 09, 2011 at 16:43 UTC
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!

Facts

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

Reported by

Possible assignees