mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
The default highlight language is now Python 3.
References: #2279. This means that source code is highlighted as Python 3 (which is mostly a superset of Python 2), and no parsing is attempted to distinguish valid code.
This commit is contained in:
@@ -17,10 +17,12 @@ Test file and literal inclusion
|
||||
|
||||
.. should give a warning
|
||||
.. literalinclude:: wrongenc.inc
|
||||
:language: none
|
||||
|
||||
.. should succeed
|
||||
.. literalinclude:: wrongenc.inc
|
||||
:encoding: latin-1
|
||||
:language: none
|
||||
.. include:: wrongenc.inc
|
||||
:encoding: latin-1
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@ Generic reST
|
||||
|
||||
A |subst| (the definition is in rst_epilog).
|
||||
|
||||
.. highlight:: none
|
||||
|
||||
.. _label:
|
||||
|
||||
::
|
||||
|
||||
@@ -31,16 +31,16 @@ http://www.python.org/logo.png
|
||||
reading included file u'.*?wrongenc.inc' seems to be wrong, try giving an \
|
||||
:encoding: option\\n?
|
||||
%(root)s/includes.txt:4: WARNING: download file not readable: .*?nonexisting.png
|
||||
(%(root)s/markup.txt:357: WARNING: invalid single index entry u'')?
|
||||
(%(root)s/markup.txt:359: WARNING: invalid single index entry u'')?
|
||||
(%(root)s/undecodable.txt:3: WARNING: undecodable source characters, replacing \
|
||||
with "\\?": b?'here: >>>(\\\\|/)xbb<<<'
|
||||
)?"""
|
||||
|
||||
HTML_WARNINGS = ENV_WARNINGS + """\
|
||||
%(root)s/images.txt:20: WARNING: no matching candidate for image URI u'foo.\\*'
|
||||
%(root)s/markup.txt:269: WARNING: Could not parse literal_block as "c". highlighting skipped.
|
||||
%(root)s/markup.txt:271: WARNING: Could not lex literal_block as "c". Highlighting skipped.
|
||||
%(root)s/footnote.txt:60: WARNING: citation not found: missing
|
||||
%(root)s/markup.txt:158: WARNING: unknown option: &option
|
||||
%(root)s/markup.txt:160: WARNING: unknown option: &option
|
||||
"""
|
||||
|
||||
if PY3:
|
||||
|
||||
@@ -24,10 +24,10 @@ from test_build_html import ENV_WARNINGS
|
||||
|
||||
|
||||
LATEX_WARNINGS = ENV_WARNINGS + """\
|
||||
%(root)s/markup.txt:158: WARNING: unknown option: &option
|
||||
%(root)s/markup.txt:160: WARNING: unknown option: &option
|
||||
%(root)s/footnote.txt:60: WARNING: citation not found: missing
|
||||
%(root)s/images.txt:20: WARNING: no matching candidate for image URI u'foo.\\*'
|
||||
%(root)s/markup.txt:269: WARNING: Could not parse literal_block as "c". highlighting skipped.
|
||||
%(root)s/markup.txt:271: WARNING: Could not lex literal_block as "c". Highlighting skipped.
|
||||
"""
|
||||
|
||||
if PY3:
|
||||
|
||||
@@ -23,7 +23,7 @@ from test_build_html import ENV_WARNINGS
|
||||
|
||||
|
||||
TEXINFO_WARNINGS = ENV_WARNINGS + """\
|
||||
%(root)s/markup.txt:158: WARNING: unknown option: &option
|
||||
%(root)s/markup.txt:160: WARNING: unknown option: &option
|
||||
%(root)s/footnote.txt:60: WARNING: citation not found: missing
|
||||
%(root)s/images.txt:20: WARNING: no matching candidate for image URI u'foo.\\*'
|
||||
%(root)s/images.txt:29: WARNING: no matching candidate for image URI u'svgimg.\\*'
|
||||
|
||||
Reference in New Issue
Block a user