Sphinx:类描述中的文字块导致与属性/方法表重叠
您好,我对 Sphinx 有疑问,我的描述文本似乎与属性和方法表重叠。当我向类描述添加缩进(文字块)时会发生这种情况。如果我的类描述没有任何缩进,则不会发生重叠问题。我在文档页面中的预期行为如下:
描述, 属性表, 方法表
,但由于缩进(文字块),我会得到 描述 属性表, 方法表, 说明(续)。
我已附上屏幕截图作为示例。在屏幕截图中,列表项应该出现在属性表之前:
- CHECK
- RETURN_HTTP_RESPONSE
感谢您的帮助。
编辑: 相应的 .rst 文件如下所示:
ProtectionRule
==============
.. currentmodule:: oci.waf.models
.. autoclass:: ProtectionRule
:show-inheritance:
:special-members: __init__
:members:
:undoc-members:
:inherited-members:
Hi I have issue with Sphinx where my description text seems to overlap with the attributes and methods table. This happens when I add an indentation (Literal Block) to the class description. If my class description does not have any indentation, then the overlap issue does not happen. My expected behavior in the doc page is as follow:
Description,
Attributes Table,
Methods Table
but because of the indentation (literal block) I would get
Description
Attributes Table,
Methods Table,
Description (continued).
I've attached a screenshot for an example. Here in the screenshot, the list items are supposed to appear before the Attributes table:
- CHECK
- RETURN_HTTP_RESPONSE
Thanks for the help.
Edit:
The corresponding .rst file looks like so:
ProtectionRule
==============
.. currentmodule:: oci.waf.models
.. autoclass:: ProtectionRule
:show-inheritance:
:special-members: __init__
:members:
:undoc-members:
:inherited-members:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论