python-sphinx - Including a literal block inside an admonition
问题描述
I'm an RST newbie. I want to create a Warning block that includes a line of code.
Here are four attempts:
.. WARNING:: Base case - This doesn't format the next line as a literal::
$ ls /
.. WARNING:: Split over two lines - This still doesn't format the next line
as a literal::
$ ls /
.. WARNING:: Indented - Still no luck::
$ ls /
.. WARNING:: Split line AND indented. Works, but gives a warning "Unexpected
indentation"::
$ ls /
And here is the result from Sphinx.
The last example gives the output I am looking for, but I get a warning from Sphinx when it runs it.
What am I missing?
解决方案
我解决了。发布后不久,我通过点击任意按钮随机点击答案,直到它起作用:
.. WARNING:: The magic incantation - a blank line::
$ ls /
推荐阅读
- angular - 如何将组件添加到元素引用中?
- html - 悬停时的转换延迟关闭
- python - Pygame 只在按键上前进
- php - Doctrine ArrayCollection 大 O
- android - Handler 的 postDelayed 的回调:检查 FragmentActivity 是否不为 null 且未销毁?
- python - 使用 Python mysql.connector 连接到 MariaDB 的问题
- java - 使用 Logstash 索引从 Cassandra 到 Solr 的项目
- php - 为什么邮件程序在 php 中不起作用,我在哪里弄错了?
- javascript - 在确认弹出窗口(Node、Express、Jade)中单击 Ok 时如何发出 POST 请求而不是 GET
- python-3.x - 如何处理 ValueError:Julian Day 必须是正数