Skip to content

Commit ae2b5d2

Browse files
committed
docs: fix wrong markdown links
Signed-off-by: Alessandro Comodi <[email protected]>
1 parent 35f0068 commit ae2b5d2

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

doc/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ recommonmark
1313
sphinx-markdown-tables
1414

1515
# Handle markdown cross-references
16-
git+https://github.com/SymbiFlow/sphinxcontrib-markdown-symlinks@bd0869b817568dce268bcdc3dc3dc7a7bd40c392
16+
git+https://github.com/SymbiFlow/sphinxcontrib-markdown-symlinks
1717

1818
#Handle references in bibtex format
1919
#

doc/src/conf.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,9 @@
8282
# Add any paths that contain templates here, relative to this directory.
8383
templates_path = []
8484

85-
# Support rendering Markdown docs
86-
source_parsers = {
87-
".md": "markdown_code_symlinks.LinkParser",
88-
}
89-
9085
# The suffix(es) of source filenames.
9186
# You can specify multiple suffix as a list of string:
92-
source_suffix = [".rst", ".md"]
87+
source_suffix = [".rst"]
9388

9489
# The encoding of source files.
9590
# source_encoding = 'utf-8-sig'
@@ -379,6 +374,21 @@
379374
assert os.path.exists(prjdir) == True, "Regenerate doxygen XML for {}".format(prjname)
380375

381376

377+
def recommonmark_setup(app):
378+
"""Initialize Sphinx extension."""
379+
import sphinx
380+
381+
if sphinx.version_info >= (1, 8):
382+
app.add_source_suffix(".md", "markdown")
383+
app.add_source_parser(LinkParser)
384+
385+
return {"version": recommonmark.__version__, "parallel_read_safe": True}
386+
387+
388+
# Override recommonmark setup
389+
recommonmark.setup = recommonmark_setup
390+
391+
382392
def setup(app):
383393
github_code_repo = "https://github.com/verilog-to-routing/vtr-verilog-to-routing/"
384394
github_code_branch = "blob/master/"

0 commit comments

Comments
 (0)