用 Sphinx/rst 标记的安全部分
Security portion marking with Sphinx/rst
如何使用 Sphinx/rst 成功地安全部分标记段落?
(U) This is a portion marked heading
------------------------------------
(U) This is a portion marked sentence that renders not what I'd expect.
(U) This too is portion marked, and renders unexpectedly.
(U) This too is portion marked, but it does render fine when another sentence is placed directly below.
Next sentence.
渲染后(见下文),标题看起来不错,但句子看起来像一个列表。由于对使用 (
和 )
字符的部分标记信息的严格要求,使用 substitution/replace 指令不是可接受的解决方案。
渲染输出:
(U) This is a portion marked heading
U. This is a portion marked sentence that renders not what I'd expect.
U. This too is portion marked, and renders unexpectedly.
(U) This too is portion marked, but it does render fine when another sentence is placed directly below. Next sentence.
这一行,
(U) This is a portion marked sentence
被解释为枚举列表中的项目,其中 (U)
是用括号括起来的枚举数。
参见 http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#enumerated-lists。这里说:
If a single-line paragraph begins with text identical to an enumerator ("A.", "1.", "(b)", "I)", etc.), the first character will have to be escaped in order to have the line parsed as an ordinary paragraph:
所以(U)
前面的反斜杠会使该行显示为普通段落:
\(U) This is a portion marked sentence
如何使用 Sphinx/rst 成功地安全部分标记段落?
(U) This is a portion marked heading
------------------------------------
(U) This is a portion marked sentence that renders not what I'd expect.
(U) This too is portion marked, and renders unexpectedly.
(U) This too is portion marked, but it does render fine when another sentence is placed directly below.
Next sentence.
渲染后(见下文),标题看起来不错,但句子看起来像一个列表。由于对使用 (
和 )
字符的部分标记信息的严格要求,使用 substitution/replace 指令不是可接受的解决方案。
渲染输出:
(U) This is a portion marked heading
U. This is a portion marked sentence that renders not what I'd expect.
U. This too is portion marked, and renders unexpectedly.
(U) This too is portion marked, but it does render fine when another sentence is placed directly below. Next sentence.
这一行,
(U) This is a portion marked sentence
被解释为枚举列表中的项目,其中 (U)
是用括号括起来的枚举数。
参见 http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#enumerated-lists。这里说:
If a single-line paragraph begins with text identical to an enumerator ("A.", "1.", "(b)", "I)", etc.), the first character will have to be escaped in order to have the line parsed as an ordinary paragraph:
所以(U)
前面的反斜杠会使该行显示为普通段落:
\(U) This is a portion marked sentence