epydoc 和 reStructuredText 更改链接名称
我将 reStructuredText 与 epydoc 一起使用。如何使内部链接的文本与链接的目标不同?我有:
:todo: Figure out the `Product.manufacturer` relationship in `Product`.
产品链接看起来不错并且链接到产品对象。 Product.manufacturer 链接转到正确的成员变量,但我只想成为制造商,而不是 Product.manufacturer 文本。
我知道如果我使用 epytext 就可以做到这一点,但我们想坚持使用 reStructuredText,以便我们可以稍后根据需要切换文档生成器。
I'm using reStructuredText with epydoc. How can I have the text of an internal link different than the target of the link? I have:
:todo: Figure out the `Product.manufacturer` relationship in `Product`.
The Product link looks fine and links to the Product object. The Product.manufacturer link goes to the proper member variable, but instead of the text being Product.manufacturer, I'd like to just be manufacturer.
I know this can be done if I use epytext, but we'd like to stick with reStructuredText so that we can switch documentation generators later if we want to.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我自己对 epydoc 并不熟悉,但正常的 reStructuredText 方式是这样的:
或者,使用 Sphinx,
考虑到 epydoc 似乎已经覆盖了提供链接的默认角色,它将被留给它。然而,这是最有可能起作用的:
I'm not familiar with epydoc myself, but the normal reStructuredText way would be this:
Or, with Sphinx,
Considering that epydoc seems to have overridden the default role to provide links, it will be being left to it. However, this is the most likely to work: