-
-
Save kozyszoo/f6d7fcdb5303aef5168f85bac87561bc to your computer and use it in GitHub Desktop.
py-gfm (GithubFlavoredMarkdownExtension) が import できない時の対処法[Python3] ref: https://qiita.com/kozzy/items/35c92fb6be4c8de916c4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ pip3 install markdown | |
$ pip3 uninstall markdown |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip3 uninstall markdown | |
pip3 install git+https://github.com/Python-Markdown/markdown.git@regex-fixes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip3 uninstall markdown | |
pip3 install git+https://github.com/Python-Markdown/markdown.git@2.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import markdown | |
markdown.inlinepatterns.BRK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'\\[([^\\]\\[]*(\\[[^\\]\\[]*(\\[[^\\]\\[]*(\\[[^\\]\\[]*(\\[[^\\]\\[]*(\\[[^\\]\\[]*(\\[[^\\]\\[]*\\])*[^\\]\\[]*\\])*[^\\]\\[]*\\])*[^\\]\\[]*\\])*[^\\]\\[]*\\])*[^\\]\\[]*\\])*[^\\]\\[]*)\\]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%load_ext tsumiki |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%tsumiki | |
:Markdown: | |
# Title | |
:HTML::: | |
<p>col0</p> | |
<font color="red">Red</font> | |
</br> | |
<font color="green">Green</font> | |
:Markdown::: | |
col1 | |
* list1 | |
* list2 | |
:Markdown::: | |
col2 | |
* list1 | |
* list2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import markdown | |
from mdx_gfm import GithubFlavoredMarkdownExtension | |
source = """ | |
Hello, *world*! This is a ~~good~~marvelous day! | |
Here is an auto link: https://example.org/ | |
Le me introduce you to [task lists] (https://github.com/blog/1375-task-lists-in-gfm-issues-pulls-comments): | |
- [ ] eggs | |
- [x] milk | |
You can also have fenced code blocks: | |
``` | |
import this | |
``` | |
""" | |
# Direct conversion | |
html = markdown.markdown(source, | |
extensions=[GithubFlavoredMarkdownExtension()]) | |
# Factory-like | |
md = markdown.Markdown(extensions=[GithubFlavoredMarkdownExtension()]) | |
html = md.convert(source) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--------------------------------------------------------------------------- | |
AttributeError Traceback (most recent call last) | |
<ipython-input-2-58535ab67692> in <module>() | |
1 import markdown | |
2 | |
----> 3 markdown.inlinepatterns.BRK | |
AttributeError: module 'markdown.inlinepatterns' has no attribute 'BRK' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment