Skip to content

Commit 3f97f78

Browse files
Merge pull request #301 from thombashi/fix_str_literal_warn
DeprecationWarning: invalid escape sequence
2 parents e0af184 + 204c7b2 commit 3f97f78

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/markdown2.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ def preprocess(self, text):
440440
#
441441
# # header
442442
_meta_data_pattern = re.compile(r'^(?:---[\ \t]*\n)?(.*:\s+>\n\s+[\S\s]+?)(?=\n\w+\s*:\s*\w+\n|\Z)|([\S\w]+\s*:(?! >)[ \t]*.*\n?)(?:---[\ \t]*\n)?', re.MULTILINE)
443-
_key_val_pat = re.compile("[\S\w]+\s*:(?! >)[ \t]*.*\n?", re.MULTILINE)
443+
_key_val_pat = re.compile(r"[\S\w]+\s*:(?! >)[ \t]*.*\n?", re.MULTILINE)
444444
# this allows key: >
445445
# value
446446
# conutiues over multiple lines
@@ -998,9 +998,9 @@ def _prepare_pyshell_blocks(self, text):
998998

999999
def _table_sub(self, match):
10001000
trim_space_re = '^[ \t\n]+|[ \t\n]+$'
1001-
trim_bar_re = '^\||\|$'
1002-
split_bar_re = '^\||(?<!\\\\)\|'
1003-
escape_bar_re = '\\\\\|'
1001+
trim_bar_re = r'^\||\|$'
1002+
split_bar_re = r'^\||(?<!\\)\|'
1003+
escape_bar_re = r'\\\|'
10041004

10051005
head, underline, body = match.groups()
10061006

0 commit comments

Comments
 (0)