Skip to content

Commit

Permalink
parsers/markdown: use GFM by default. adds py-gfm dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
ZoomTen committed Apr 30, 2021
1 parent 6bbfa64 commit 5496fa8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion mdiocre/parsers/markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import re
from . import BaseParser, sub_func
from markdown import Markdown
from mdx_gfm import GithubFlavoredMarkdownExtension

class MarkdownParser(BaseParser):
'''
Expand All @@ -18,7 +19,7 @@ def conv_sub_func(match):

markdown = re.sub(self.RE_COMMENTS, conv_sub_func, markdown)

html = Markdown().convert(markdown)
html = Markdown(extensions=[GithubFlavoredMarkdownExtension()]).convert(markdown)

if not ignore_content:
v.variables["content"] = html
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
url='https://github.com/ZoomTen/MDiocre',
packages=['mdiocre', 'mdiocre.parsers', 'mdiocre.interface'],
keywords=['converter', 'generator', 'markdown', 'html', 'static'],
install_requires=['markdown'],
install_requires=['markdown', 'py-gfm'],
entry_points={
'console_scripts':
[
Expand Down

0 comments on commit 5496fa8

Please sign in to comment.