Skip to content
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

Switch to MyST-Parser from recommonmark #27

Merged
merged 1 commit into from
Apr 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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