aboutsummaryrefslogtreecommitdiffstats
path: root/tox.ini
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2014-07-29 21:34:58 -0400
committerWaylan Limberg <waylan@gmail.com>2014-07-29 21:34:58 -0400
commitaae373860b5c5cbb40f126bf5acb9693dc577c4a (patch)
treeb7193438629aa4e1a6e07c229e76198cfb341b85 /tox.ini
parenta8396c322a4d836dee399cd3cc3dce0a964fe5c0 (diff)
downloadmarkdown-aae373860b5c5cbb40f126bf5acb9693dc577c4a.tar.gz
markdown-aae373860b5c5cbb40f126bf5acb9693dc577c4a.tar.bz2
markdown-aae373860b5c5cbb40f126bf5acb9693dc577c4a.zip
Refactor markdown.extensions.Extension.__init__()
As pointed out in #325, setting up Extension configs is kind of a mess. Some places pass a list of tuples on initialization, others a dict. And sometimes they're passed as an arg, othertimes a kwarg. Addiitonaly, the docs are just as inconsistant. This refactor addresses all those sinerios with tests included. The existing extensions still need refactored. But the fact that their tests still pass means we havn't broken third party extensions either. This refactor also introduces a new API, which is the prefered method going forward. All docs should be updated to match. Whereas previously one might do: ```python MyExtension(configs={'key': 'foo', 'otherkey': 'bar'}) ``` This can now be done: ```python MyExtension(key='foo', otherkey='bar') ``` Of course, the old way still works for backward compatability. But that means the `configs` keyword has special status and cannot be used for another purpose.
Diffstat (limited to 'tox.ini')
0 files changed, 0 insertions, 0 deletions