--- text_moin_wiki_old.py	2007-02-08 19:25:32.000000000 +0100
+++ text_moin_wiki.py	2007-02-08 19:40:06.000000000 +0100
@@ -88,6 +88,7 @@
 (?P<indent>^\s+)
 (?P<tableZ>\|\| $)
 (?P<table>(?:\|\|)+(?:<[^>]*?>)?(?!\|? $))
+(?P<esc_heading>^\s*!(?P<esc_hmarker>=+)\s.*\s(?P=esc_hmarker) $)
 (?P<heading>^\s*(?P<hmarker>=+)\s.*\s(?P=hmarker) $)
 (?P<interwiki>[A-Z][a-zA-Z]+\:(%(q_string)s|([^\s'\"\:\<\|]([^\s%(punct)s]|([%(punct)s][^\s%(punct)s]))+))?)
 (?P<word>%(word_rule)s)
@@ -745,6 +746,8 @@
         else:
             return self.formatter.text(word)
 
+    def _esc_heading_repl(self, word):
+        return self._heading_repl(word.strip(' !'))
 
     def _heading_repl(self, word):
         """Handle section headings."""
@@ -894,7 +897,7 @@
         """ Replace match using type name """
         result = []
         for type, hit in match.groupdict().items():
-            if hit is not None and not type in ["hmarker", ]:
+            if hit is not None and not type in ["hmarker", "esc_hmarker" ]:
 
                 ##result.append(u'<span class="info">[replace: %s: "%s"]</span>' % (type, hit))
                 # Open p for certain types
