mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Added the `prepend and append` options to the
``literalinclude`` directive.
This commit is contained in:
@@ -37,6 +37,10 @@ Literalinclude options
|
||||
:start-after: coding: utf-8
|
||||
:end-before: class Foo
|
||||
|
||||
.. cssclass:: inc-preappend
|
||||
.. literalinclude:: literal.inc
|
||||
:prepend: START CODE
|
||||
:append: END CODE
|
||||
|
||||
Testing downloadable files
|
||||
==========================
|
||||
|
||||
@@ -43,7 +43,7 @@ ENV_WARNINGS = """\
|
||||
http://www.python.org/logo.png
|
||||
%(root)s/includes.txt:: (WARNING/2) Encoding 'utf-8-sig' used for reading \
|
||||
included file u'wrongenc.inc' seems to be wrong, try giving an :encoding: option
|
||||
%(root)s/includes.txt:56: WARNING: download file not readable: nonexisting.png
|
||||
%(root)s/includes.txt:60: WARNING: download file not readable: nonexisting.png
|
||||
"""
|
||||
|
||||
HTML_WARNINGS = ENV_WARNINGS + """\
|
||||
@@ -134,6 +134,8 @@ if pygments:
|
||||
r'^class Foo:\n pass\nclass Bar:\n$',
|
||||
".//div[@class='inc-startend highlight-text']/div/pre":
|
||||
ur'^foo = u"Including Unicode characters: üöä"\n$',
|
||||
".//div[@class='inc-preappend highlight-text']/div/pre":
|
||||
r'(?m)^START CODE$',
|
||||
})
|
||||
HTML_XPATH['subdir/includes.html'].update({
|
||||
".//pre/span": 'line 1',
|
||||
|
||||
Reference in New Issue
Block a user