I'm trying to follow the documentation here and add a section. My goal is to write a big comment in a Python file (models/keyboard.py
) and to be able to reference it in comments in other python files like (see :ref:my-reference
)
It's the reStructuredText
option for a comment in a Python file
When I try to copy-paste the example, like this, in a comment in a Python file:
""" .. _my-reference-label: Section to cross-reference -------------------------- This is the text of the section. It refers to the section itself, see :ref:`my-reference-label`. """
If I try to ctrl-click the my-reference-label
I get this Cannot find declaration to go to
.
How to make this work?
https://stackoverflow.com/questions/66946252/how-to-add-cross-reference-to-rest-header-in-pycharm April 05, 2021 at 06:00AM
没有评论:
发表评论