Pandoc 首先显示控制字符

Pandoc rst displaying control characters

我正在尝试使用 RST 和 pandoc 在列表元素后显示 code-block。我的标记如下所示:

4. For the given inputs, my program produces the following output:
   .. code-block::

    298561404
    (0,0)
    john doe 4

但是渲染输出 (pandoc -o hw.pdf hw.rst) 中有 .. code-block::。我尝试了几种不同的代码指令,但它们都给出了相同的结果。我在这里做错了什么?

如果在 code-block 指令之前插入一个空行,它会起作用:

4. For the given inputs, my program produces the following output:

   .. code-block::

    298561404
    (0,0)
    john doe 4

另一种选择是跳过 code-block 并在前一段的末尾简单地使用两个冒号(这表明以下文本块是 literal block):

4. For the given inputs, my program produces the following output::

   298561404
   (0,0)
   john doe 4