On 9/12/06, Nick Jenkins nickpj@gmail.com wrote:
However, now asterisks have two behaviours (bolding & unordered lists). Just to clarify what I think the spec is saying about the precedence of these, and what happens when they intersect in weird and unbalanced ways, this test input: ============= A ** test** to ** see **what ** bold * and lists does ** *** **
** test ** end **
Should render as: "<p>A <strong> test</strong> to ** see</p><ul><li><ul><li>what ** bold *</li></ul></li></ul><p>and lists does <strong> </strong>* **</p><ul><li><ul><li>test <strong> end </strong></li></ul></li></ul>".
Is that correct? I don't personally mind what the correct answer is, but I do want to make sure that there is only one unambiguous and correct answer, and that it can be logically determined from the specs.
Another syntax cleanup proposal also suggested this dual use for *, and their solution was to evaluate bolding from right to left on a per-line basis, and any remaining asterisks on the left could become bulleted lists. So
A ** test** to ** see **what ** bold * and lists does ** *** ** ** test ** end **
Would probably become
A **test<b> to </b> see <b>what </b> bold * and lists does ** *<b> </b> <ul><li><ul><li> test <b> end </b></li></ul></li></ul>
That behavior might not be desirable, but the general idea of "interpret matched initial double asterisk as bold, unmatched as list" is a good one.
On 9/12/06, Timwi timwi@gmx.net wrote:
Your above example is invalid mark-up. :-)
**This** line is valid, yet ambiguous under what appear to be current specs. When is initial double asterisk bold, when is it list?