5. 测试可下载文件¶
下载 img.png
这里。下载 this
那里。下载 file with special characters
。
6. 测试文件和文字包含¶


# Literally included file using Python highlighting
# -*- coding: utf-8 -*-
foo = "Including Unicode characters: üöä"
class Foo:
pass
class Bar:
def baz():
pass
def bar(): pass
This file is encoded in latin-1 but at first read as utf-8.
Max Strauß aß in München eine Leberkässemmel.
这个文件是用拉丁文-1编码的,但最初读作UTF-8。
München eine LeberkäsSemmel的马克斯·施特劳埃。
7. 文本包含选项¶
class Foo:
pass
def baz():
pass
6class Foo:
7 pass
8class Bar:
foo = "Including Unicode characters: üöä"
START CODE
# Literally included file using Python highlighting
# -*- coding: utf-8 -*-
foo = "Including Unicode characters: üöä"
class Foo:
pass
class Bar:
def baz():
pass
def bar(): pass
END CODE
foo = "Including Unicode characters: üöä"
class Foo:
pass
class Bar:
def baz():
pass
def bar(): pass
# Literally included file using Python highlighting
# -*- coding: utf-8 -*-
foo = "Including Unicode characters: üöä"
--- /pb1/repo/sphinx/tests/roots/test-root/literal_orig.inc
+++ /pb1/repo/sphinx/tests/roots/test-root/literal.inc
@@ -1,11 +1,12 @@
# Literally included file using Python highlighting
+# -*- coding: utf-8 -*-
-foo = "Including Unicode characters: üöä" # This will be changed
+foo = "Including Unicode characters: üöä"
-class FooOrig:
+class Foo:
pass
-class BarOrig:
+class Bar:
def baz():
pass
Tabs include file test
----------------------
The next line has a tab:
-| |-
Tabs include file test
----------------------
The next line has a tab:
-| |-
6class Foo:
7 pass
6class Foo:
7 pass
3foo = "Including Unicode characters: üöä"
在解析工作之前,测试是否进行了数据删除。
def baz():
pass
8. Docutils包含在“字面”中¶
虽然不推荐,但它应该是有效的(不要用引号)。
Testing "quotes" in literal 'included' text.