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
6 changes: 3 additions & 3 deletions markdown/extensions/attr_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@


def _handle_double_quote(s, t):
k, v = t.split('=')
k, v = t.split('=', 1)
return k, v.strip('"')


def _handle_single_quote(s, t):
k, v = t.split('=')
k, v = t.split('=', 1)
return k, v.strip("'")


def _handle_key_value(s, t):
return t.split('=')
return t.split('=', 1)


def _handle_word(s, t):
Expand Down
1 change: 1 addition & 0 deletions tests/extensions/attr_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,6 @@ <h1>Bad attributes</h1>
<p>No <em>key or value</em></p>
<p><em>Weirdness</em></p>
<p><em>More weirdness</em></p>
<p>This should not cause a <em foo="a=b">crash</em></p>
<p>Attr_lists do not contain <em>newlines</em>{ foo=bar
key=value }</p>
2 changes: 2 additions & 0 deletions tests/extensions/attr_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,7 @@ No *key or value*{ = }

*More weirdness*{ === }

This should not cause a *crash*{ foo=a=b }

Attr_lists do not contain *newlines*{ foo=bar
key=value }