--8<---------------cut here---------------start------------->8---
.. |BMF| replace:: :file:`BMF`
.. |BRF| replace:: :file:`BRF`
.. |aa| replace:: :command:`display`
|BMF| and |BRF|
--8<---------------cut here---------------end--------------->8---
When I process my project I get:
--8<---------------cut here---------------start------------->8---
Sphinx v0.5.1, building html
loading pickled environment... done
building [html]: targets for 1 source files that are out of date
updating environment: 0 added, 1 changed, 0 removed
reading sources... aa
WARNING: /data/tmp/hoel/GLPy/doc/brf2ansysload/aa.rst:1: (ERROR/3) Error in "replace" directive: may contain a single paragraph only.
WARNING: /data/tmp/hoel/GLPy/doc/brf2ansysload/aa.rst:1: (WARNING/2) Substitution definition "BMF" empty or invalid.
.. |BMF| replace:: :file:`BMF`
WARNING: /data/tmp/hoel/GLPy/doc/brf2ansysload/aa.rst:3: (ERROR/3) Error in "replace" directive: may contain a single paragraph only.
WARNING: /data/tmp/hoel/GLPy/doc/brf2ansysload/aa.rst:3: (WARNING/2) Substitution definition "aa" empty or invalid.
.. |aa| replace:: :command:`display`
WARNING: /data/tmp/hoel/GLPy/doc/brf2ansysload/aa.rst:5: (ERROR/3) Undefined substitution referenced: "BMF".
pickling environment... done
...
--8<---------------cut here---------------end--------------->8---
What is going wrong here? Why is it complaining on the first and third
`replace` only?
Kind Regards
Berthold Höllmann
--
__ Address:
G / \ L Germanischer Lloyd
phone: +49-40-36149-7374 -+----+- Vorsetzen 35 P.O.Box 111606
fax : +49-40-36149-7320 \__/ D-20459 Hamburg D-20416 Hamburg
Hi,
I've debugged this, and it seems like a docutils problem. The "file" role
is registered as a "canonical" role, i.e. not language dependent.
Therefore a system message is generated, and the content of the parsed
replacement is not a single paragraph, but a paragraph and a system message.
I've now switched to registering custom roles as "local", which should
circumvent this problem.
Georg