| Newsgroups |
gmane.text.docutils.user |
| Message-ID |
<[email protected]> |
The following fails:
replace_bug.rst:
|Bug|_
.. |Bug| replace::
A. Bug: the initial causes problems.
.. _Bug:
Failure:
$ rst2html.py --version
rst2html.py (Docutils 0.14, Python 2.7.13, on darwin)
$ rst2html.py replace_bug.rst > replace_bug.html
replace_bug.rst:3: (ERROR/3) Error in "replace" directive: may contain a single paragraph only.
replace_bug.rst:3: (WARNING/2) Substitution definition "Bug" empty or invalid.
.. |Bug| replace::
A. Bug: the initial causes problems.
replace_bug.rst:1: (ERROR/3) Undefined substitution referenced: "Bug".
This was based on the replacement example from the documentation:
|Python|_
.. |Python| replace::
Python: A great language!
.. _Python:
A workaround is to escape the space *and* include an additional space, but this is very ugly. Is there a better solution?
|Workaround|_
.. |Workaround| replace::
A.\ Bug: the initial causes problems.
.. _Workaround:
Am I misreading the documentation/misusing replacements or should I file a bug report?
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot