Skip to content

Commit

Permalink
Merge pull request #27 from jpmckinney/myst-parser
Browse files Browse the repository at this point in the history
Switch to MyST-Parser from recommonmark
  • Loading branch information
Bjwebb authored Apr 27, 2021
2 parents 101d6bb + 698eab6 commit 73288c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
'Sphinx>=0.6',
'jsonref',
'jsonpointer',
'recommonmark',
'myst-parser',
]

setup(
Expand Down
9 changes: 2 additions & 7 deletions sphinxcontrib/jsonschema.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
from jsonpointer import resolve_pointer
from docutils import nodes
from docutils.parsers.rst import directives, Directive
from docutils.utils import new_document
from recommonmark.parser import CommonMarkParser
from myst_parser.main import to_docutils


import json
Expand Down Expand Up @@ -165,11 +164,7 @@ def cell(self, text, morecols=0, source=None):
if not isinstance(text, str):
text = str(text)

parser = CommonMarkParser()
new_doc = new_document(None)
parser.parse(text, new_doc)

for child in new_doc.children[:]:
for child in to_docutils(text).children[:]:
child.source = source
entry += child
return entry
Expand Down

0 comments on commit 73288c3

Please sign in to comment.