In reStructuredText, how to put an inline literal inside of a hyperlink?

后端 未结 2 1486
悲哀的现实
悲哀的现实 2021-01-07 20:35

In my reStructuredText document, I have a section defined like so:

Update the ``PATH`` Environment Variable
----------------------------------------
<         


        
2条回答
  •  囚心锁ツ
    2021-01-07 21:26

    With a workaround, yes -- it is possible (hinted from @mzjn's comment).

    For example:

    .. |dummy| replace:: Update the ``PATH`` Environment Variable
    .. _dummy:
    
    Update the ``PATH`` Environment Variable
    ----------------------------------------
    
    * |dummy|_
    

    This is achieved by taking advantage of the replace directive.

提交回复
热议问题