Skip to content

Commit 29a9d78

Browse files
Merge pull request #687 from Crozzers/assertionerror-issue686
Fix AssertionError hashing HTML blocks spread over multiple lines (#686)
2 parents 5c1f39a + a53a611 commit 29a9d78

File tree

5 files changed

+9
-2
lines changed

5 files changed

+9
-2
lines changed

CHANGES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## python-markdown2 2.5.6 (not yet released)
44

5-
(nothing yet)
5+
- [pull #687] Fix AssertionError hashing HTML blocks spread over multiple lines (#686)
66

77

88
## python-markdown2 2.5.5

lib/markdown2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,7 @@ def _hash_html_block_sub(
922922
tag = None
923923

924924
if not tag:
925-
m = re.match(r'.*?<(\S).*?\s*>', html)
925+
m = re.match(r'.*?<(\S).*?\s*>', html, re.S)
926926
# tag shouldn't be none but make the assertion for type checker
927927
assert m is not None
928928
tag = m.group(1)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<p
2+
class="abc">test
3+
</p>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
issue686 assertionerror
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<p
2+
class="abc">test
3+
</p>

0 commit comments

Comments
 (0)