Bold becomes a list


If you lead a paragraph with a bold item, it is interpreted as a list. Example:
my bold item
This is interpreted as an indented list. Unfortunately, this requires evaluating the context of the entire line in order to determine whether a "closing" bold marker is present. Moreover, if one is present, was it actually the first opening bold marker? In my opinion, this points to a weakness in the spec.
**my second-level list itemmy bold item
Regardless, the ambiguity must be addressed since it's part of the 1.0 spec. Here's a link that mentions it.
Thanks for the great parser!

file attachments

Closed Sep 16, 2009 at 12:11 AM by thermous
Integrated solution from tcl as version


tcl wrote Mar 17, 2009 at 5:22 PM

This diff provides a fix for this bug as well as the list bug. The workaround is to only treat a leading ** as a list item if we're already in a list.

This behavior is mentioned in the List section of:


"About unordered lists and bold: a line starting with ** (including optional whitespace before and afterwards), immediately following any list element on a line above, will be treated as a nested unordered list element. Otherwise it will be treated as the beginning of bold text."

I ran this on the the Creole 1.0 test case (JSP Test Cases) and it performed better than the parser on the WikiCreole web site itself (!). Great work.

wrote Mar 17, 2009 at 5:22 PM

wrote Sep 16, 2009 at 12:11 AM

wrote Feb 13, 2013 at 5:25 PM

wrote May 15, 2013 at 3:43 AM