File: 0003-Be-forgiving.patch

package info (click to toggle)
python-markdown2 2.3.10-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,280 kB
  • sloc: python: 2,897; makefile: 35; sh: 6
file content (32 lines) | stat: -rw-r--r-- 1,220 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From: Nicholas Serra <nickserra@gmail.com>
Date: Wed, 20 Jan 2021 18:28:54 -0500
Subject: [3/3] Be forgiving
Origin: https://github.com/trentm/python-markdown2/commit/c4b4ccb3f9da33f29b013d6d765fd223a8277cfe
Bug: https://github.com/trentm/python-markdown2/pull/387
Bug-Debian: https://bugs.debian.org/984668
Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2021-26813

---
 lib/markdown2.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/markdown2.py b/lib/markdown2.py
index 61bb6f691632..61b22006e3bc 100755
--- a/lib/markdown2.py
+++ b/lib/markdown2.py
@@ -1926,9 +1926,9 @@ class Markdown(object):
 
     _fenced_code_block_re = re.compile(r'''
         (?:\n+|\A\n?)
-        ^```\s{0,2}([\w+-]+)?\s*?\n  # opening fence, $1 = optional lang
-        (.*?)                        # $2 = code block content
-        ^```[ \t]*\n                 # closing fence
+        ^```\s{0,99}([\w+-]+)?\s{0,99}\n  # opening fence, $1 = optional lang
+        (.*?)                             # $2 = code block content
+        ^```[ \t]*\n                      # closing fence
         ''', re.M | re.X | re.S)
 
     def _fenced_code_block_sub(self, match):
-- 
2.32.0.rc0