【发布时间】:2019-07-17 03:21:50
【问题描述】:
在markdown中,我可以这样做:
Imagine a long paragraph here, with [an extended phrase linked
to something elsewhere][shortref].
[shortref]: http://really-long-and-annoying-link-here
reStructuredText 中的等效语法是什么?
【问题讨论】:
在markdown中,我可以这样做:
Imagine a long paragraph here, with [an extended phrase linked
to something elsewhere][shortref].
[shortref]: http://really-long-and-annoying-link-here
reStructuredText 中的等效语法是什么?
【问题讨论】:
您可以定义一个substitution,其中包含一个替换和对相应超链接目标的引用。
Imagine a long paragraph here, with |SR|_.
.. |SR| replace:: an extended phrase linked to something elsewhere
.. _SR: http://really-long-and-annoying-link-here
另一个选项不是完全等价的,但仍然接近:
Imagine a long paragraph here, with `an extended phrase linked
to something elsewhere`_.
Here is a short reference link: `shortref`_.
.. _shortref: `an extended phrase linked to something elsewhere`_
.. _an extended phrase linked to something elsewhere: http://really-long-and-annoying-link-here
上面的例子使用了external and indirect hyperlink targets的组合。
【讨论】: