-
Notifications
You must be signed in to change notification settings - Fork 434
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
Emacs style extras comment not working as expected #365
Comments
I also tried this on the beginning of the document and at the end , and it is simply not working.:
and I tried the one-liner ( and I know, it is boring) it does also not work
It looks like the fenced-code-blocks does also not work and the use-file-vars |
Have you tried passing in the import markdown2
text = """<!-- markdown-extras: code-friendly, footnotes -->
This markdown text will be converted with the "code-friendly" and "footnotes"
extras enabled."""
markdown2.markdown(text, use_file_vars=True) EDIT: |
Interesting, after your comment regarding -*- I think I found the missing link (or at least for me wishing to run from the command line). I embedded this: Then executed the standalone module using instead of the documented way: And that both takes effect, and also doesn't appear in the final html. It's a bit weird, and not sure why --use-file-vars takes an arg, but it works here for me. |
The python-markdown2/lib/markdown2.py Lines 160 to 163 in bc175ad
In any case, I've submitted a pull request that should take one-liners (like |
Hello, the documentation here:
https://github.com/trentm/python-markdown2/wiki/Extras
Indicates you can embed which extras you would like enabled in a comment. I've tried that verbatim and it doesn't seem to work for me. After looking in the code, it appears to me (not an expert by any means) that it also wants to see the emacs tokens '-*-' before and after the comment. I also tried that, to no avail.
Finally, the help indicates that "use-file-vars: Look for an Emacs-style markdown-extras file variable to turn
on Extras." might be necessary although the code seems to not use it. I tried for fun, but still nothing.
Some clarification would be greatly appreciated, I like the idea of this feature so I can stop trying to remember "how did I process this particular file?" and just embed it.
The text was updated successfully, but these errors were encountered: