diff --git a/wikiconvert.py b/wikiconvert.py index d09705d..16dc060 100644 --- a/wikiconvert.py +++ b/wikiconvert.py @@ -94,6 +94,9 @@ def sub_wikilink(m): return hash text = re.compile(r'\[((?:[A-Z][a-z]+)+)(?:\s+(.*?))?\]', re.S).sub(sub_wikilink, text) + # Wiki link escapes + text = re.compile(r'(\s|\A)!([A-Z]\w+)(\s|\B)').sub(r'\1\2\3', text) + # Links def sub_link(m): s = "[%s](%s)" % (m.group(2), m.group(1))