]> oss.titaniummirror.com Git - webber.git/commitdiff
Patch markdown2.py like old read_markdown.py, treating '=' like '#' for headers.
authorR. Steve McKown <rsmckown@gmail.com>
Wed, 16 Dec 2009 02:08:24 +0000 (19:08 -0700)
committerR. Steve McKown <rsmckown@gmail.com>
Wed, 16 Dec 2009 02:08:24 +0000 (19:08 -0700)
plugins/markdown2.py

index cffec4136a43ce21ce6b3a3f7f7b01ae97a70afb..f3d8df4578400279e4f9e819b993bcdc27e05348 100755 (executable)
@@ -1023,12 +1023,12 @@ class Markdown(object):
                % (n, self._run_span_gamut(match.group(1)), n)
 
     _atx_h_re = re.compile(r'''
-        ^(\#{1,6})  # \1 = string of #'s
+        ^([\#=]{1,6})  # \1 = string of #'s
         [ \t]*
         (.+?)       # \2 = Header text
         [ \t]*
         (?<!\\)     # ensure not an escaped trailing '#'
-        \#*         # optional closing #'s (not counted)
+        [\#=]*         # optional closing #'s (not counted)
         \n+
         ''', re.X | re.M)
     def _atx_h_sub(self, match):