From: Guenter M. <mi...@us...> - 2017-02-28 07:52:00
|
Dear Matěj, On 2017-02-27, Matěj Cepl wrote: > Would it be possible to persuade rst2html5 to output comments as ><p class="comment"> (or something of that sort) in HTML? So, > that it would be possible to have comments visible in the draft > version of the document? This is possible via subclassing the writer and overriding the visist_comment/depart_comment methods. The simpler method would be to set the class in the rst source:: .. class:: comment This is a paragraph with class="comment" in all export formats. which becomes:: <document source="/tmp/comm.rst"> <paragraph classes="comment"> This is a paragraph with class="comment" in all export formats. (The class directive allows content, an empty class directive is applied to the next element.) Changing these comments to "real" rst comments is a simple replace-all task. Günter |