From: Waylan L. <wa...@gm...> - 2008-10-14 00:34:07
|
On Mon, Oct 13, 2008 at 7:35 PM, Yuri Takhteyev <qar...@gm...> wrote: >> Why not just make the InlineProcessor be one of the 'postprocessors' >> and then extensions can add additional postprocessors either before or >> after it as needed? > > Good point. If we then also get rid of the > preprocessor/textpreprocessor distinction, we can just reduce it all > to three: > > Preprocessor treap: HtmlBlock, Header, Line, Reference > Treeprocessors treap: Inline > Postprocessors treap: Prettify, RawHtml, AndSubstitute Except that Prettify is a Treeprocessor. In any event, I like this naming much better (pre, tree, post). It's much clearer whats going on. > > Extensions can then insert processors into one of those three treaps > and also insert patterns into the inline processor. (Or they can > replace InlineProcessor with their own.) ...or they can replace/subclass the MarkdownParser. With this api, someone could use the Markdown engine and rewrite a completely different markup language. Not that one should, but the fact that one can is a testament to the api IMO. -- --- Waylan Limberg wa...@gm... |