Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More generic "extensions" parameter for Markdown #406

Closed
wants to merge 9 commits into from

Conversation

zopieux
Copy link
Contributor

@zopieux zopieux commented Mar 26, 2015

In the current state, users can only provide a comma-separated list of extension paths in MARKDOWN_EXTENSIONS. This prevents the users from setting extension-specific parameters such as TocExtension(marker="--TOC--", permalink=True)

In this patch we only do the splitting if the extension parameter is a string (using six.string_types of course) so the caller can use a list of Extension instances instead. Docstring was updated accordingly.

Fantomas42 and others added 8 commits December 3, 2013 21:12
In the current state, users can only provide a comma-separated list of extension paths. This prevents the users from givin extension-specific settings such as `TocExtension(marker="--TOC--", permalink=True)`

In this patch we only do the splitting if the extension parameter is a string (using `six.string_types` of course) so the caller can use a list of Extension instances instead.
@zopieux
Copy link
Contributor Author

zopieux commented Mar 26, 2015

I'll add a test case in test/markups.py as soon as I am back home. You may want to wait until they're appended to this PR before merging. 🍭

@zopieux
Copy link
Contributor Author

zopieux commented Mar 26, 2015

Test added, this should be merge-ready.

@Fantomas42
Copy link
Owner

Thanks @zopieux for your work.

Your work has been merged at 9b82fb4

With your idea the markdown extension is really better.

@zopieux
Copy link
Contributor Author

zopieux commented Apr 17, 2015

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants