Skip to content

Commit

Permalink
Stop replacing lang syntax for fenced markdown (keras-team#864)
Browse files Browse the repository at this point in the history
The CodeHilite to the markdown renderer now supports the usual syntax,
and newer version appear to no longer supports the
::: syntax.

I'm not sure exactly when this happened, but we can just depend on
the latest version of python-markdown.
  • Loading branch information
mattdangerw authored Apr 28, 2022
1 parent cc6cb93 commit 7df8863
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pygments>=2.7.4
jinja2
markdown
markdown>=3.3
requests
mdx_truly_sane_lists
sphinx~=3.0.3
Expand Down
4 changes: 0 additions & 4 deletions scripts/autogen.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,10 +686,6 @@ def render_single_file(self, src_location, fname, nav):
for key, value in replacements.items():
md_content = md_content.replace(key, value)

# Convert ```lang notation to the hilite syntax
md_content = md_content.replace("```python\n", "```\n:::python\n")
md_content = md_content.replace("```shell\n", "```\n:::none\n")

html_content = markdown.markdown(
md_content,
extensions=["fenced_code", "tables", "codehilite", "mdx_truly_sane_lists",],
Expand Down

0 comments on commit 7df8863

Please sign in to comment.