Anonymous hyperlinks in restructuredtext
Ned Batchelder
ned at nedbatchelder.com
Sat May 28 08:37:07 EDT 2016
On Saturday, May 28, 2016 at 8:28:35 AM UTC-4, Sergio Spina wrote:
> From the "restructuredtext markup specification":
>
> > Anonymous hyperlink targets consist of an explicit markup
> > start (".. "), two underscores, a colon, whitespace, and a
> > link block; there is no reference name:
> >
> > .. __: anonymous-hyperlink-target-link-block
> >
> > An alternate syntax for anonymous hyperlinks consists of two
> > underscores, a space, and a link block:
> >
> > __ anonymous-hyperlink-target-link-block
>
> Ok. I got the file "test.rst"
>
> ...
>
> Now I put a reference to link1_ and another to link2_
The docs say, "there is no reference name", so you cannot put a reference
to them. You can use an anonymous syntax:
Jump to `my blog`__.
__ http://myblog.com
or you can use a named syntax:
Jump to `my blog`_.
.. _my blog: http://myblog.com
The ReST syntax can be arcane...
--Ned.
More information about the Python-list
mailing list