diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-07-19 19:37:31 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-07-20 19:50:23 +0300 |
commit | 0c277f3ff007a464d7769c9561c449428d38dabc (patch) | |
tree | 2444a5f99ee65846ddd9f57a30635e28cb405b03 /sphinx/highlighting.py | |
parent | f272d6876cb499ac25f779e606593e3459e565b7 (diff) |
``sphinx.highlighting.PygmentsBridge.unhighlight()`` is deprecated
Diffstat (limited to 'sphinx/highlighting.py')
-rw-r--r-- | sphinx/highlighting.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sphinx/highlighting.py b/sphinx/highlighting.py index dd248107c..f31ff88cc 100644 --- a/sphinx/highlighting.py +++ b/sphinx/highlighting.py @@ -9,6 +9,8 @@ :license: BSD, see LICENSE for details. """ +import warnings + from pygments import highlight from pygments.filters import ErrorToken from pygments.formatters import HtmlFormatter, LatexFormatter @@ -20,6 +22,7 @@ from pygments.styles import get_style_by_name from pygments.util import ClassNotFound from six import text_type +from sphinx.deprecation import RemovedInSphinx30Warning from sphinx.ext import doctest from sphinx.locale import __ from sphinx.pygments_styles import SphinxStyle, NoneStyle @@ -93,6 +96,8 @@ class PygmentsBridge(object): def unhighlighted(self, source): # type: (unicode) -> unicode + warnings.warn('PygmentsBridge.unhighlighted() is now deprecated.', + RemovedInSphinx30Warning) if self.dest == 'html': return '<pre>' + htmlescape(source) + '</pre>\n' else: |