User talk:Sean/autop

From Habari Project

Jump to: navigation, search

Regarding the questions:

<b>foo<i>bar</b></i>
I think should return
<p><b>foo<i>bar</b></i>
Regarding the
<b>foo\n\nbar</b>
one might assume the author intends for
<p><b>foo<br><br>bar</b></p>
however I think we should be consistent in the rule, \n\n == new paragraph so I would return
<p><b>foo</p><p>bar</b></p>
however invalid that may be.

At least that'd be my take, which is also based on my experience in doing user support with another blog platform that employs an autop function. Meaning, it would be much simpler to simply say "two or more new lines equals an new paragraph, one new line equals an empty element, period."

Ideally, to placate the Word users of the world who don't understand HTML and expect every carriage return to do something, two \n would equal a new paragraph, and any additional \n would convert to an empty element, ie
<b>foo\n\n\nbar</b>
would return
<p><b>foo</p><br><p>bar</b></p>
but that might be taking it too far.

--miklb 10:09, 16 February 2009 (UTC)

Personal tools