Skip to content

Commit

Permalink
Merge pull request #15 from karthiks3000/markdown-support
Browse files Browse the repository at this point in the history
use full extension paths for PyInstaller to work
  • Loading branch information
karthiks3000 authored Apr 2, 2021
2 parents 96015c1 + 2d29bf1 commit 554c5e0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
17 changes: 13 additions & 4 deletions postman_doc_gen/document_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,19 @@ def markdown_to_html(md_text):
:param md_text: the text with markdown
:return: the converted html code
"""
return markdown.markdown(md_text, extensions=['extra', 'abbr', 'attr_list', 'def_list', 'fenced_code',
'footnotes', 'md_in_html', 'tables', 'admonition', 'codehilite',
'legacy_attrs', 'legacy_em', 'meta', 'nl2br', 'sane_lists',
'smarty', 'toc', 'wikilinks'], output_format='html5')
return markdown.markdown(md_text, extensions=['markdown.extensions.abbr',
'markdown.extensions.attr_list', 'markdown.extensions.def_list',
'markdown.extensions.fenced_code',
'markdown.extensions.footnotes',
'markdown.extensions.md_in_html', 'markdown.extensions.tables',
'markdown.extensions.admonition',
'markdown.extensions.codehilite',
'markdown.extensions.legacy_attrs',
'markdown.extensions.legacy_em',
'markdown.extensions.meta', 'markdown.extensions.nl2br',
'markdown.extensions.sane_lists', 'markdown.extensions.smarty',
'markdown.extensions.toc', 'markdown.extensions.wikilinks'],
output_format='html5')

@staticmethod
def get_body(body: json) -> APIBodyModel:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Markdown==3.3.4
MarkupSafe==1.1.1
packaging==20.9
Pygments==2.8.1
PyInstaller==3.6
PyInstaller==4.2
pyinstaller-hooks-contrib==2021.1
pymdown-extensions==8.1.1
pyparsing==2.4.7
Expand Down

0 comments on commit 554c5e0

Please sign in to comment.