From: Waylan L. <wa...@gm...> - 2008-02-21 20:34:38
|
David, On Thu, Feb 21, 2008 at 2:33 PM, David Wolever <wo...@cs...> wrote: > At the moment, a list extension names is passed to Markdown(), and > the Markdown class is responsible for loading them. > This makes it harder to pragmatically load extensions. Harder in what way? I guess I'm not seeing the problem your trying to solve. Before we go and break the api and people have to rewrite all their extensions (we've had indications in the past that some people are using extensions they've never made public) I'd like to understand why, that's all. > > I have written a patch (attached) so that a list of extension modules > will be passed to Markdown(). One concern I have it that, unless I missed it, you have completely removed the `extension_configs` arg. You only allow key=value pairs separated by commas. The `extension_configs` arg makes it possible to easily set configs programicly or even pass in complex python data structures. Consider the Abbreviation Extension[1]. It accepts a dictionary of abbreviation definitions through the `extension_configs` arg among other ways to define abbreviations. One use case for that is that perhaps a project stores a list of abbreviations in a database or some other non flat-file format. That project's code could then gather those definitions into a dict and pass them in. Perhaps each user has a different list of definitions. Or sometimes the same abbreviation could have different meanings in different contexts, so the list is adjusted based upon the category of the document. You get the idea. I'd like to keep that ability. Although, that is my extension so I'm partial. [1]: http://achinghead.com/markdown/abbr/ > When running from the command line, extensions will be loaded as the > command line arguments are parsed (through the new load_extension > function). > > This will break the Markdown interface, though, so I haven't > committed the code. > > What do you think? > > David > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Python-markdown-discuss mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss > > -- ---- Waylan Limberg wa...@gm... |