Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## python-markdown2 2.5.6 (not yet released)

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


## python-markdown2 2.5.5
Expand Down
2 changes: 1 addition & 1 deletion lib/markdown2.py
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,7 @@ def _hash_html_block_sub(
tag = None

if not tag:
m = re.match(r'.*?<(\S).*?\s*>', html)
m = re.match(r'.*?<(\S).*?\s*>', html, re.S)
# tag shouldn't be none but make the assertion for type checker
assert m is not None
tag = m.group(1)
Expand Down
3 changes: 3 additions & 0 deletions test/tm-cases/hash_html_blocks_issue686.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<p
class="abc">test
</p>
1 change: 1 addition & 0 deletions test/tm-cases/hash_html_blocks_issue686.tags
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
issue686 assertionerror
3 changes: 3 additions & 0 deletions test/tm-cases/hash_html_blocks_issue686.text
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<p
class="abc">test
</p>
Loading