summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES2
-rw-r--r--sphinx/texinputs/sphinx.sty3
2 files changed, 4 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index 73ef4405a..ae8a74f36 100644
--- a/CHANGES
+++ b/CHANGES
@@ -16,6 +16,8 @@ Features added
Bugs fixed
----------
+* #7197: LaTeX: platex cause error to build image directive with target url
+
Testing
--------
diff --git a/sphinx/texinputs/sphinx.sty b/sphinx/texinputs/sphinx.sty
index 3e67b5610..714d98e05 100644
--- a/sphinx/texinputs/sphinx.sty
+++ b/sphinx/texinputs/sphinx.sty
@@ -1407,7 +1407,8 @@
% \sphinxcode). Sphinx uses \#, \%, \& ... always inside \sphinxhref.
\protected\def\sphinxhref#1#2{{%
\sphinxunactivateextrasandspace % never do \scantokens with active space!
- \endlinechar\m@ne\everyeof{{#2}}% keep catcode regime for #2
+% for the \endlinechar business, https://github.com/latex3/latex2e/issues/286
+ \endlinechar\m@ne\everyeof{{\endlinechar13 #2}}% keep catcode regime for #2
\scantokens{\href{#1}}% normalise it for #1 during \href expansion
}}
% Same for \url. And also \nolinkurl for coherence.