summaryrefslogtreecommitdiff
path: root/markdown/util.py
diff options
context:
space:
mode:
authorfacelessuser <faceless.shop@gmail.com>2017-12-20 17:54:23 -0700
committerfacelessuser <faceless.shop@gmail.com>2017-12-20 17:54:23 -0700
commite6fd29f3b49be58c94d8627e3aaa5b97b009c053 (patch)
treeafe7f7cfa9c56c156674a02623f93539abca8db0 /markdown/util.py
parent1edbb9dcb998966e43e02f5e345fe3d08c0307dc (diff)
downloadpython-markdown-e6fd29f3b49be58c94d8627e3aaa5b97b009c053.tar.gz
Make sure regex patterns are raw stringsregex-fixes
Python 3.6 is starting to reject invalid escapes. Regular expression patterns should be raw strings to avoid having regex escapes being mistaken for invalid string escapes. Ref #611.
Diffstat (limited to 'markdown/util.py')
-rw-r--r--markdown/util.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/markdown/util.py b/markdown/util.py
index b37e5ae..9e87019 100644
--- a/markdown/util.py
+++ b/markdown/util.py
@@ -27,12 +27,12 @@ Constants you might want to modify
BLOCK_LEVEL_ELEMENTS = re.compile(
- "^(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul"
- "|script|noscript|form|fieldset|iframe|math"
- "|hr|hr/|style|li|dt|dd|thead|tbody"
- "|tr|th|td|section|footer|header|group|figure"
- "|figcaption|aside|article|canvas|output"
- "|progress|video|nav|main)$",
+ r"^(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul"
+ r"|script|noscript|form|fieldset|iframe|math"
+ r"|hr|hr/|style|li|dt|dd|thead|tbody"
+ r"|tr|th|td|section|footer|header|group|figure"
+ r"|figcaption|aside|article|canvas|output"
+ r"|progress|video|nav|main)$",
re.IGNORECASE
)
# Placeholders