diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-11-30 15:52:42 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-11-30 15:52:42 +0300 |
commit | 15c266c4456816dc5ff2c78880a22aa772b9cd6b (patch) | |
tree | f45910c2053a813e502c354945c0e5df9492f434 /sphinx/highlighting.py | |
parent | 8c7faed6fcbc6b7d40f497698cb80fc10aee1ab3 (diff) | |
parent | 82a6048f1205ee032327e1643d879ef322a2012f (diff) |
Merge branch '2.0'
Diffstat (limited to 'sphinx/highlighting.py')
-rw-r--r-- | sphinx/highlighting.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sphinx/highlighting.py b/sphinx/highlighting.py index b2ff39a06..ca2bdc48f 100644 --- a/sphinx/highlighting.py +++ b/sphinx/highlighting.py @@ -23,8 +23,7 @@ from pygments.util import ClassNotFound from sphinx.locale import __ from sphinx.pygments_styles import SphinxStyle, NoneStyle -from sphinx.util import logging -from sphinx.util.texescape import get_hlescape_func +from sphinx.util import logging, texescape if False: # For type annotation @@ -165,8 +164,7 @@ class PygmentsBridge: if self.dest == 'html': return hlsource else: - escape = get_hlescape_func(self.latex_engine) - return escape(hlsource) + return texescape.hlescape(hlsource, self.latex_engine) def get_stylesheet(self): # type: () -> str |