如何在字面字符串中缩进文字?
我想通过划线,然后是缩进的字面输出,以使结果看起来像这样:
int write(const std::string sFileName, int iStep, float fStartTime,
const std::string sInfoString, int iWhat
但是当我使用它时
| ``int write(const std::string sFileName, int iStep, float fStartTime,
| `` const std::string sInfoString, int iWhat,``
,
int write(const std::string sFileName, int iStep, float fStartTime,
`` const std::string sInfoString, int iWhat,``
我也尝试了一个非破坏空间的Unicode替换:
.. |xx| unicode:: U+00A0
但这不是替换:
| ``int write(const std::string sFileName, int iStep, float fStartTime,
| ``|xx||xx||xx|const std::string sInfoString, int iWhat,``
结果
int write(const std::string sFileName, int iStep, float fStartTime,
|xx||xx||xx|const std::string sInfoString, int iWhat
如何在双重报价之间达到我想要的凹痕?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议使用指令。凹痕将相对于第一行代码渲染。
另外,我不知道您使用的是什么语言,但是您可以通过在 mylang 来代替
mylang
“ rel =“ nofollow noreferrer”> Pygments Lexers Page 。编辑
更新以使用 lexer
code> c ++
c ++ 。I would suggest using the
code-block
directive. Indentation will be rendered relative to the first line of code.Also I don't know what language you use, but you can substitute the proper lexer for
mylang
by looking it up on the Pygments lexers page.Edit
Updated to use the lexer
c++
.