Skip to content

Commit 5c85fca

Browse files
author
Ailin Nemui
committed
plan b
1 parent f9d31a0 commit 5c85fca

File tree

5 files changed

+22
-2
lines changed

5 files changed

+22
-2
lines changed

.github/workflows/pages.yml

+2
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ jobs:
4747
- run: pip install -r sphinx/requirements.txt
4848
- run: |
4949
patch -d "$(python -c 'import sphinx.builders.html;print(sphinx.builders.html.__path__[0])')" -p4 < patches/9731.patch
50+
- run: |
51+
patch -d "$(python -c 'import myst_parser.mdit_to_docutils;print(myst_parser.mdit_to_docutils.__path__[0])')" -p3 < patches/760.patch
5052
- run: pip install ./furo
5153
- run: |
5254
echo "PERL5LIB=$(pwd)/local/lib/perl5${PERL5LIB+:}$PERL5LIB" >> $GITHUB_ENV

install_deps.sh

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ python -m pip install -r sphinx/requirements.txt
99
patch --no-backup-if-mismatch -r - -R -f -d "$(python -c 'import sphinx.builders.html;print(sphinx.builders.html.__path__[0])')" -p4 < patches/9731.patch || :
1010
patch -d "$(python -c 'import sphinx.builders.html;print(sphinx.builders.html.__path__[0])')" -p4 < patches/9731.patch
1111

12+
patch --no-backup-if-mismatch -r - -R -f -d "$(python -c 'import myst_parser.mdit_to_docutils;print(myst_parser.mdit_to_docutils.__path__[0])')" -p3 < patches/760.patch || :
13+
patch -d "$(python -c 'import myst_parser.mdit_to_docutils;print(myst_parser.mdit_to_docutils.__path__[0])')" -p3 < patches/760.patch
14+
1215
python -m pip install -e ./furo
1316

1417
PERL5LIB="$(pwd)/local/lib/perl5${PERL5LIB+:}$PERL5LIB"

patches/760.patch

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
From https://github.com/executablebooks/MyST-Parser/issues/760#issuecomment-1951013994
2+
3+
diff --git a/myst_parser/mdit_to_docutils/base.py b/myst_parser/mdit_to_docutils/base.py
4+
index 4a02459..cee67c9 100644
5+
--- a/myst_parser/mdit_to_docutils/base.py
6+
+++ b/myst_parser/mdit_to_docutils/base.py
7+
@@ -955,7 +955,7 @@ class DocutilsRenderer(RendererProtocol):
8+
if "classes" in conversion:
9+
ref_node["classes"].extend(conversion["classes"])
10+
11+
- ref_node["refuri"] = escapeHtml(uri)
12+
+ ref_node["refuri"] = uri
13+
if implicit_text is not None:
14+
with self.current_node_context(ref_node, append=True):
15+
self.current_node.append(nodes.Text(implicit_text))

patches/9731.patch

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ diff --git a/sphinx/builders/html/__init__.py b/sphinx/builders/html/__init__.py
1111
index 6e732538b60..af71fbe5c89 100644
1212
--- a/sphinx/builders/html/__init__.py
1313
+++ b/sphinx/builders/html/__init__.py
14-
@@ -995,7 +995,7 @@ def handle_page(self, pagename: str, addctx: Dict, templatename: str = 'page.htm
14+
@@ -1036,7 +1036,7 @@ def handle_page(self, pagename: str, addctx: Dict, templatename: str = 'page.htm
1515

1616
if self.config.html_baseurl:
1717
ctx['pageurl'] = posixpath.join(self.config.html_baseurl,

sphinx/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
linkify-it-py==2.0.0
22
sphinx-sitemap==2.2.0
3-
myst-parser==0.18.1
3+
myst-parser==1.0.0
44
sphinx-design==0.2.0

0 commit comments

Comments
 (0)