From 3fe349c4bbaa1d206b60ad76c06f8f96dffa3651 Mon Sep 17 00:00:00 2001 From: Stefan Sauer Date: Mon, 7 May 2018 22:29:02 +0200 Subject: [PATCH] mkdb: handle special chars in verbatim blocks Handle '<' in a verbatim block. Fixes #795744 --- gtkdoc/mkdb.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gtkdoc/mkdb.py b/gtkdoc/mkdb.py index e844e8f..20eb389 100644 --- a/gtkdoc/mkdb.py +++ b/gtkdoc/mkdb.py @@ -2556,7 +2556,9 @@ def ConvertSGMLChars(symbol, text): # For the simple non-sgml mode, convert to entities everywhere. text = re.sub(r'&(?![a-zA-Z#]+;)', r'&', text) # Do this first, or the others get messed up. - text = re.sub(r'<', r'<', text) + # Allow '<' in verbatim markdown + # TODO: we don't want to convert any of them between `` + text = re.sub(r'(?' at beginning of string for blockquote markdown text = re.sub(r'''(?<=[^\w\n"'\/-])>''', r'>', text) -- 2.11.4.GIT