mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
`sphinx.highlighting.PygmentsBridge.unhighlight()
` is deprecated
This commit is contained in:
parent
f272d6876c
commit
0c277f3ff0
1
CHANGES
1
CHANGES
@ -102,6 +102,7 @@ Deprecated
|
|||||||
* ``sphinx.ext.mathbase.eqref`` node is deprecated
|
* ``sphinx.ext.mathbase.eqref`` node is deprecated
|
||||||
* ``sphinx.ext.mathbase.is_in_section_title()`` is deprecated
|
* ``sphinx.ext.mathbase.is_in_section_title()`` is deprecated
|
||||||
* ``sphinx.ext.mathbase.MathDomain`` is deprecated
|
* ``sphinx.ext.mathbase.MathDomain`` is deprecated
|
||||||
|
* ``sphinx.highlighting.PygmentsBridge.unhighlight()`` is deprecated
|
||||||
|
|
||||||
For more details, see `deprecation APIs list
|
For more details, see `deprecation APIs list
|
||||||
<http://www.sphinx-doc.org/en/master/extdev/index.html#deprecated-apis>`_
|
<http://www.sphinx-doc.org/en/master/extdev/index.html#deprecated-apis>`_
|
||||||
|
@ -131,6 +131,11 @@ The following is a list of deprecated interface.
|
|||||||
- 4.0
|
- 4.0
|
||||||
- :meth:`~sphinx.application.Sphinx.add_js_file()`
|
- :meth:`~sphinx.application.Sphinx.add_js_file()`
|
||||||
|
|
||||||
|
* - ``sphinx.highlighting.PygmentsBridge.unhighlight()``
|
||||||
|
- 1.8
|
||||||
|
- 3.0
|
||||||
|
- N/A
|
||||||
|
|
||||||
* - ``sphinx.ext.mathbase.MathDomain``
|
* - ``sphinx.ext.mathbase.MathDomain``
|
||||||
- 1.8
|
- 1.8
|
||||||
- 3.0
|
- 3.0
|
||||||
|
@ -9,6 +9,8 @@
|
|||||||
:license: BSD, see LICENSE for details.
|
:license: BSD, see LICENSE for details.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import warnings
|
||||||
|
|
||||||
from pygments import highlight
|
from pygments import highlight
|
||||||
from pygments.filters import ErrorToken
|
from pygments.filters import ErrorToken
|
||||||
from pygments.formatters import HtmlFormatter, LatexFormatter
|
from pygments.formatters import HtmlFormatter, LatexFormatter
|
||||||
@ -20,6 +22,7 @@ from pygments.styles import get_style_by_name
|
|||||||
from pygments.util import ClassNotFound
|
from pygments.util import ClassNotFound
|
||||||
from six import text_type
|
from six import text_type
|
||||||
|
|
||||||
|
from sphinx.deprecation import RemovedInSphinx30Warning
|
||||||
from sphinx.ext import doctest
|
from sphinx.ext import doctest
|
||||||
from sphinx.locale import __
|
from sphinx.locale import __
|
||||||
from sphinx.pygments_styles import SphinxStyle, NoneStyle
|
from sphinx.pygments_styles import SphinxStyle, NoneStyle
|
||||||
@ -93,6 +96,8 @@ class PygmentsBridge(object):
|
|||||||
|
|
||||||
def unhighlighted(self, source):
|
def unhighlighted(self, source):
|
||||||
# type: (unicode) -> unicode
|
# type: (unicode) -> unicode
|
||||||
|
warnings.warn('PygmentsBridge.unhighlighted() is now deprecated.',
|
||||||
|
RemovedInSphinx30Warning)
|
||||||
if self.dest == 'html':
|
if self.dest == 'html':
|
||||||
return '<pre>' + htmlescape(source) + '</pre>\n'
|
return '<pre>' + htmlescape(source) + '</pre>\n'
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user