| 1 |
From: Morten Lund <[email protected]> |
| 2 |
Date: Sun, 31 Oct 2021 13:57:09 -0700 |
| 3 |
Subject: Support Sphinx 4.0 |
| 4 |
|
| 5 |
Origin: https://foss.heptapod.net/doc-utils/cloud_sptheme/-/issues/45 |
| 6 |
Bug-Upstream: https://foss.heptapod.net/doc-utils/cloud_sptheme/-/issues/45 |
| 7 |
Bug-Debian: https://bugs.debian.org/997428 |
| 8 |
--- |
| 9 |
cloud_sptheme/ext/escaped_samp_literals.py | 4 ++-- |
| 10 |
1 file changed, 2 insertions(+), 2 deletions(-) |
| 11 |
|
| 12 |
diff --git a/cloud_sptheme/ext/escaped_samp_literals.py b/cloud_sptheme/ext/escaped_samp_literals.py |
| 13 |
index 6d10099..de460a2 100644 |
| 14 |
--- a/cloud_sptheme/ext/escaped_samp_literals.py |
| 15 |
+++ b/cloud_sptheme/ext/escaped_samp_literals.py |
| 16 |
@@ -84,12 +84,12 @@ def emph_literal_role(typ, rawtext, text, lineno, inliner, |
| 17 |
# sphinx entry point |
| 18 |
#============================================================================= |
| 19 |
def setup(app): |
| 20 |
|
| 21 |
+ # register our handler to overrride sphinx.roles.EmphasizedLiteral |
| 22 |
from docutils.parsers.rst import roles |
| 23 |
import sphinx.roles as mod |
| 24 |
names = [ |
| 25 |
key for key,value in mod.specific_docroles.items() |
| 26 |
|
| 27 |
+ if value is mod.EmphasizedLiteral |
| 28 |
] |
| 29 |
for name in names: |
| 30 |
roles.register_local_role(name, emph_literal_role) |