Skip to content

Commit

Permalink
complete coverage of what is there
Browse files Browse the repository at this point in the history
  • Loading branch information
caronc committed Oct 6, 2023
1 parent f725b3a commit 4c1b5ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apprise/conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def handle_starttag(self, tag, attrs):
self._preserver_cr = True

elif tag == 'a':
for name, link in attrs:
for name, link in attrs: # pragma: no branch
if name == 'href':
self._link = '(' + link + ')'
# Take an early exit for speed (in case there are more
Expand Down
5 changes: 5 additions & 0 deletions test/test_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ def to_html(body):
"<a href='#'>my link</a>") == \
"test my link"

# a with missing href entry
assert to_html("<span></span<<span>test</span> "
"<a>my link</a>") == \
"test my link"

# </p> missing
assert to_html("<body><div>line 1 <b>bold</b></div> "
" <a href='#'>my link</a>"
Expand Down

0 comments on commit 4c1b5ca

Please sign in to comment.