且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在代码环境中的 reStructuredText 中强制使用不间断空格?

更新时间:2023-01-10 10:17:04

如果在 reST 文件中用不间断空格 (U+00A0) 替换常规空格字符,它对我有用.这将在输出中生成一个包含 Google Drive 元素:

It works for me if the regular space character is replaced with a non-breaking space (U+00A0) in the reST file. That will produce a single <span> element containing Google&nbsp;Drive in the output:

<span class="pre">~/Google&nbsp;Drive/code/mac/install.sh</span>

插入文字不间断空格可以通过多种方式完成.请参阅https://en.wikipedia.org/wiki/Non-breaking_space#Keyboard_entry_methods一>.

Inserting a literal non-breaking space can be done in several ways. See https://en.wikipedia.org/wiki/Non-breaking_space#Keyboard_entry_methods.