From: Waylan L. <wa...@gm...> - 2008-07-08 17:52:55
|
On Tue, Jul 8, 2008 at 12:40 PM, Yuri Takhteyev <qar...@gm...> wrote: >> Is this still true if you have inline not-necessarily-legal-XML blocks? >> (i.e. will it still be easy to convert: >> **Foo** >> <br> >> blah blah blah >> 'bar' >> ?) > > I meant a simple RE-based substitution. Correct me if I am wrong, but > converting XHTML into HTML largely involves changing <$x/> and > <$x></$x> to to <$x> for certain values of $x. Yeah, that *should* cover the basics. Of course, anyone could always pass Markdown's output into uTidylib [1] or ElementTree Tidy [2] if they want a solid conversion. Unfortunately, it will likely slow things down to much to offer that option in Markdown directly. However, it may not be a bad idea to have an extension for those who want it. Hmm, now to get back on-subject - I wonder if either of those tools will do whitespace normalization only, without making any other changes to the output. It's worth exploring for the tests. [1]: http://utidylib.berlios.de/ [2]: http://effbot.org/zone/element-tidylib.htm > >> What if we went with the BOM character (oxFEFF) as the replacement? It's >> legal unicode, and _extremely_ unlikely to occur in the middle of text. The >> only thing to watch out for is having it occur at the start of the file. > > First, my original intention was to use not \u0001 and \u0002 but > rather \u0002 and \u0003 - "start of text" (STX) and "end of text" > (ETX). The nice thing about them is that they come as a pair - start > and end. Also, if we use BOM we'll have to worry about HTML, etc. > occuring in the beginning of the text. But this is an option to keep > in mind. Alternatively, we can look into the private ranges, though > then we have to make sure that our use does not conflict with possible > private uses by the caller. > > - yuri > > -- > http://sputnik.freewisdom.org/ > > ------------------------------------------------------------------------- > Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! > Studies have shown that voting for your favorite open source project, > along with a healthy diet, reduces your potential for chronic lameness > and boredom. Vote Now at http://www.sourceforge.net/community/cca08 > _______________________________________________ > Python-markdown-discuss mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss > -- ---- Waylan Limberg wa...@gm... |