a_g*_*est 5 whitespace restructuredtext python-sphinx
当我使用
``# ``
Run Code Online (Sandbox Code Playgroud)
在我的Sphinx文档中,我收到以下警告:
WARNING: Inline literal start-string without end-string.
Run Code Online (Sandbox Code Playgroud)
试
:samp:`# `
Run Code Online (Sandbox Code Playgroud)
导致
WARNING: Inline interpreted text or phrase reference start-string without end-string.
Run Code Online (Sandbox Code Playgroud)
The problem seems to be the trailing whitespace however I couldn't figure out a way of getting around this problem. Escaping the whitespace with a backslash (\) doesn't help either (for the first example the warning persists and for the second example the whitespace is omitted in the generated docs).
This answer doesn't work because the inline code section interprets the |space| as a literal string.
Experienced with Sphinx 1.6.2.
解决方法是对尾随空白使用不间断空格字符 (U+00A0),而不是常规空格 (U+0020)。
有多种方法可以插入原义不间断空格字符。请参阅https://en.wikipedia.org/wiki/Non-breaking_space#Keyboard_entry_methods。
| 归档时间: |
|
| 查看次数: |
1647 次 |
| 最近记录: |