--- a/doc/runrst Thu Apr 22 09:57:04 2010 +0200
+++ b/doc/runrst Thu Apr 22 10:04:53 2010 +0200
@@ -13,7 +13,16 @@
"""
import sys
+from docutils.parsers.rst import roles
from docutils.core import publish_cmdline
+from docutils import nodes, utils
+
+def role_hg(name, rawtext, text, lineno, inliner,
+ options={}, content=[]):
+ node = nodes.literal(rawtext, "hg " + utils.unescape(text, True))
+ return [node], []
+
+roles.register_local_role("hg", role_hg)
if __name__ == "__main__":
if len(sys.argv) < 2: