简体   繁体   中英

Refering to a (sphynx autodoc generated) python method (:py:meth:) from a myst-parser markdown file?

I have a section of sphinx doc generated by the sphinx:autoclass: directive

I want to refer to the (docstring) generated doc of a python method from a mystmarkdown file

From

I have tried this:

{:py:meth:} the_module.TheClass.the_method

but the generated doc has no hyperlink, only highlighted the_module.TheClass.the_method

According to the MyST documentation , you would use the following syntax.

Using the role:

{py:meth}`the_module.TheClass.the_method`

Using the Markdown syntax:

[the_method](the_module.TheClass.the_method)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM