Format::autop() has a relatively well-defined task - to serve as a
convenience function to convert two or more consecutive newlines
within block elements into a p tag, and a single newline in a block
element into a br tag,

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.

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.

I would add items to the list of block level tags, in particular the
children of the lists such as li, dd, dt. Either treat them as block
or convert each newline into a br tag.

Rick

On Feb 15, 8:20 pm, Sean Coates <[email protected]> wrote:
> I've been doing some work on using the HTML Tokenizer and HTML Token  
> Set for autop. I didn't get very far, but I have a partially working  
> version now in SVN (in a 
> branch):https://svn.habariproject.org/habari/branches/090214-autoptoken/
>   andhttps://svn.habariproject.org/habari/branches/090214-autoptoken/htdoc...
>
> In addition, I've set up some unit tests to make sure we're  
> implementing this right, see:
> -https://svn.habariproject.org/habari/branches/090214-autoptoken/tests...
> -https://svn.habariproject.org/habari/branches/090214-autoptoken/tests...
> (thanks to Mike Lietz for the initial test data)
>
> I've set up what is basically an RFC 
> at:http://wiki.habariproject.org/en/User:sean/autop
> I'm looking for feedback on those issues/questions and to help flesh  
> out what exactly we expect autop to do, and how it should do it.
>
> Any feedback is appreciated (here or on the wiki page), as are  
> additional test cases, and patches to the Format class in the autop  
> branch.
>
> S
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to