New feature in CVS: strict structured text
"Bauer, Georg" <[email protected]> Tue, 27 Jan 2004 16:11:59 +0100
| Newsgroups | gmane.comp.pythin.pyds.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi! Because of the weirdness and interferences of cheetah and reST, I now added a way to set your posting format (and to preset a default value for that) to "strict structured text". This is just plain old reST, only that it doesn't run the cheetah engine on it's result. This helps if you are using code-block or pycode a lot and have to spray in #raw and #end raw lines just to prevent cheetah from barfing on $ or # occurrences. And it makes stuff much cleaner, as the source for a posting is only reST and not two languages mixed. Shortcuts still work in both forms - you still can use "shortcut" and |shortcut| in strict structured text. Only difference is that those shortcuts are directly evaluated before inserting, so shortcuts that refer to something that needs to be set up before call to the shortcut won't work. This implies that you still can use cheetah code in your strict structured text postings, only you need a shortcut to call it. MetaWeblogAPI and BloggerAPI now use this new mode for posting formats, unless the posting starts with a '<' - if that is the case, the format is set to HTML. So you can't add or usefully edit mixed language entries, but that's not a big deal as the remote API methods actually didn't work before 0.7 ;-) - but this is something that might break older posts, if you edit them. Actually there isn't a good way to gather from the source code wether it should be HTML or reST or strict reST and both APIs don't give you a flag to say what it is, so PyDS needs to apply some stupidity here. One area where I am not really sure on what to use is the WikiTool. From it's form I _think_ it should use strict structured text, but currently still uses the "old" restructured text format. Maybe Garth has an opinion on this. Another possible addition would be a .. cheetah:: directive that would allow you to insert explicit cheetah markup in strict reST postings. I think this could be modeled after the code-block directive. But I am unsure wether those inserted cheetah blocks should themselves be HTML source or reST blocks - I think they should be HTML source with included cheetah directives, so you can build weird formattings in reSt by just using .. cheetah:: (or maybe .. markup::?). Comments? Ideas? bye, Georg