rick c wrote: > > I can't see that it should try to fix broken html. That would be much > more work, and considering the problems we've had with the apparently > straightforward task of creating a convenience function for writers, I > don't see that we would be successful anytime soon unless we used an > external library for it.
I agree with this notion, and expand on it with the thought that if autop is applied to invalid markup, we shouldn't be held responsible for it being even more mangled than the original. Not to say that it will, just that we shouldn't (yet) bother to test that for any invalid input we're producing valid output. > Text within inline tags, as in the example you give on the wiki page > with the b tags, should be left alone. If the writer want's a br tag > instead of a newline in the location indicated, they should enter it. > I admit it could be asking something of writers to know the difference > between an inline tag and a block tag. Here's a different idea: * When autop creates a new block, it is created inside the currently open block element. * Any non-block tags that are open when autop closes a block are also legally closed * Non-block tags that are open when autop closes a block are not re-opened in the next autop-created block * Closing tags that are not open are omitted It would take this: <b>One\n \n Two</b> And create this: <p><b>One</b></p> <p>Two</p> Likewise, it would take this: <ul><li><b><i>One\n \n Two</b></li></ul> And create this: <ul><li><p><b><i>One</i></b></p> <p>Two</p></li></ul> Owen --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/habari-dev -~----------~----~----~----~------~----~------~--~---
