Skip to content

Commit 7f85f16

Browse files
committed
Update reCommonMark Sphinx integration according to https://www.sphinx-doc.org/en/master/usage/markdown.html
1 parent e337488 commit 7f85f16

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

docs/conf.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,9 @@
4444
'sphinx.ext.viewcode',
4545
]
4646

47-
import recommonmark
48-
from recommonmark.parser import CommonMarkParser
49-
from recommonmark.transform import AutoStructify
50-
5147
# Use reCommonMark for parsing text documents as MarkDown
5248
source_parsers = {
53-
'.md': CommonMarkParser
49+
'.md': 'recommonmark.parser.CommonMarkParser',
5450
}
5551

5652
# Add any paths that contain templates here, relative to this directory.
@@ -162,7 +158,7 @@
162158
# Add any paths that contain custom static files (such as style sheets) here,
163159
# relative to this directory. They are copied after the builtin static files,
164160
# so a file named "default.css" will overwrite the builtin "default.css".
165-
html_static_path = ['_static']
161+
#html_static_path = ['_static']
166162

167163
# Add any extra paths that contain custom files (such as robots.txt or
168164
# .htaccess) here, relative to this directory. These files are copied
@@ -364,6 +360,7 @@
364360

365361
# app setup hook for reCommonMark's AutoStructify
366362
def setup(app):
363+
from recommonmark.transform import AutoStructify
367364
app.add_config_value('recommonmark_config', {
368365
'auto_toc_tree_section': 'Contents',
369366
}, True)

0 commit comments

Comments
 (0)