Skip to content

Commit c4b4ccb

Browse files
committed
Be forgiving
1 parent e1954d3 commit c4b4ccb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/markdown2.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1926,9 +1926,9 @@ def _do_code_blocks(self, text):
19261926

19271927
_fenced_code_block_re = re.compile(r'''
19281928
(?:\n+|\A\n?)
1929-
^```\s{0,2}([\w+-]+)?\s*?\n # opening fence, $1 = optional lang
1930-
(.*?) # $2 = code block content
1931-
^```[ \t]*\n # closing fence
1929+
^```\s{0,99}([\w+-]+)?\s{0,99}\n # opening fence, $1 = optional lang
1930+
(.*?) # $2 = code block content
1931+
^```[ \t]*\n # closing fence
19321932
''', re.M | re.X | re.S)
19331933

19341934
def _fenced_code_block_sub(self, match):

0 commit comments

Comments
 (0)