Nick Jenkins wrote:
[Brion Vibber wrote] :
<b>First paragraph
Second paragraph
Just thinking aloud, but could this be made equivalent to:
============================== '''First paragraph
Second paragraph
Well, what do you mean by "equivalent to" here?
Wiki bold/italics (with ''...'' and '''...''') are handled on per-line basis currently, cut off at the end of the line. This means that within a single paragraph we can have:
normal'''bold normal
which converts to output:
<p>normal<b>bold</b> </p>
So what's the desired behavior for this input:
normal<b>bold ?????
Should it close off the inline tag at the end of the paragraph:
<p>normal<b>bold ?????</b></p>
or at the end of the line?
<p>normal<b>bold</b> ?????</p>
Further what about the interaction between <b> and ''' used together? Are they separate? How should we treat something like this:
<b>bold'''????'''????</b>
The most sensible probably is to continue thinking of <b> and ''' as distinct items, resulting in output like this:
<b>bold<b>????</b>????</b>
The nested bolds are perfectly legal, if pointless. :)
It would probably *not* make sense to treat that as equal to:
'''bold'''????'''????'''
which would render as:
<b>bold</b>????<b>????</b>
To return to the original question: to do that, we probably need to know where the paragraph boundaries are at the time HTML normalization is done. That probably means either doing block level conversion to HTML *before* normalization, or doing them together in one pass.
-- brion vibber (brion @ pobox.com)