I found this while trying to debug README on PyPI wasn't processing
================== Term ================== $ ==================
While this seems to work with regular rst2html, it seems to cause a warning with --strict.
rst2html.py break.rst --strict
break.rst:4: (INFO/1) Possible incomplete section title.
Treating the overline as ordinary text because it's so short.
Exiting due to level-1 (INFO) system message.
If $ is switched out, it works.
If the $ is escaped, i.e. \$, then it will work.
Docutils 0.14, Python 3.6.3
I am wondering if it's related to this http://docutils.sourceforge.net/BUGS.html#known-bugs
Blank first columns in simple tables with explicit row separators silently swallow their input. They should at least produce system error messages. But, with explicit row separators, the meaning is unambiguous and ought to be supported:
============== ========== Table with row separators ============== ========== and blank -------------- ---------- entries -------------- ---------- in first -------------- ---------- columns. ============== ==========
Thank you for reporting a problem you found in Docutils.
It is, however a feature, not a bug:
$ belongs to the set of section markup characters. http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#sections
section markup is not allowed inside table cells. (The first example is actually not a table but two sections: the first with over- and underline and title "Term", the second with underlined title "$".)
In case of short lines (<4 chars) and over-underline mismatch, the parser assumes a text instead of faulty markup and just emits an info (level 1 system message) -- just in case it was meant as markup despite the mismatch.
--strict means halt on even the slightest problem (any level), see http://docutils.sourceforge.net/docs/user/config.html#report-level and http://docutils.sourceforge.net/docs/user/config.html#halt-level.
You already presented several ways around the exit.
Additional alternatives are: --report=info instead of --strict, replace the $ with a character outside the set of section title markup characters.
Last edit: Günter Milde 2017-12-03