This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author nmassman
Recipients BTaskaya, nmassman, r.david.murray
Date 2019-12-27.02:19:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I took a crack at the rst side of this, to see if I could reduce it to just one easy to parse for line in each file that needs to be modified.

Yeah, not so easy.

Substituting text in rst isn't hard, you just insert '|ucd_version|' where the version string should go and then include the following line somewhere below.

.. |ucd_version| replace:: 12.1.0

The problem is that I cant find any combination that makes this work for substituting the version string inside of a hyperlink. I've tried multiple combinations and every time the hyperlink gets broken.

So this, inside Doc/library/stdtypes.rst:

See\ |ucd_version|\ /ucd/extracted/DerivedNumericType.txt

Becomes this in the html:

See <a class="reference external" href=""></a>12.1.0/ucd/extracted/DerivedNumericType.txt

It does in fact do the substitution, but the substituted text onward doesn't get included in the hyperlink.

It gets worse if you try to hyperlink text instead of just the url.

In Doc/library/unicodedata.rst I tried this:

compiled from the |ucd_link|_.

.. |ucd_link| replace:: UCD version |ucd_version|
.. _ucd_link:|ucd_version|/ucd

and got:

compiled from the <a class="reference external" href="|ucd_version|/ucd">UCD version 12.1.0</a>

The sub inside a sub works fine, but no combination I tried could get it to work in the hyperlink itself.

Near as I can tell, the only way to accomplish this would require adding or possibly creating a plugin for sphinx.
Date User Action Args
2019-12-27 02:19:03nmassmansetrecipients: + nmassman, r.david.murray, BTaskaya
2019-12-27 02:19:03nmassmansetmessageid: <>
2019-12-27 02:19:03nmassmanlinkissue22593 messages
2019-12-27 02:19:02nmassmancreate