当前位置:  开发笔记 > 前端 > 正文

如何使用reStructuredText创建新行?

如何解决《如何使用reStructuredText创建新行?》经验,为你挑选了3个好方法。

如何在第一个强制换行/换行?我不希望它是一个新段落(即行之间没有额外的空格),我只想让文本从一个新行开始.谢谢!



1> Steve Piercy..:

根据docutils raw角色的文档,您可以这样做:

If there just *has* to be a line break here,
:raw-html:`
` it can be accomplished with a "raw"-derived role. But the line block syntax should be considered first.

并且如此所述,首先考虑行块语法.

.. role:: raw-html(raw)
    :format: html



2> tiggerae..:

该行块语法也工作过,是有点清洁:

| This is a line | This is another line | Another new line



3> 小智..:

我们在global.rst文件中添加了替换,因此我们不必一直添加原始标签。

.. |br| raw:: html

  

这样我们就可以使用| br | 当我们需要换行时。

推荐阅读
凹凸曼00威威_694
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有