pelican/rst2html 代码块错误

pelican/rst2html codeblock error

重组文本这段(清理,代码在文本前后)

    Cleaning up...

.. code-block::

    from sqlobject import StringCol, SQLObject, ForeignKey, sqlhub, connectionForURI

    sqlhub.processConnection = connectionForURI('sqlite:/:memory:')

    class Person(SQLObject):
        name = StringCol()
        class Address(SQLObject):
        address = StringCol()
        person = ForeignKey('Person')

        Person.createTable()
        Address.createTable()

The code

由 rst2html 正确构建,但当我尝试使用 Pelican(pelican 内容命令)处理它时生成以下错误:

(ERROR/3) Error in "code-block" directive: 1 argument(s) required, 0 supplied.

我该如何解决这个问题?我尝试了各种缩进,在代码块和实际代码之间有和没有空行……

为了回答这个问题我可以转述mzjn的评论。将 Python 添加到行 ..code-block 解决了问题。