Skip to content

Commit

Permalink
fixed: trailing characters after reference definition
Browse files Browse the repository at this point in the history
  • Loading branch information
Mi Yu committed Jun 25, 2018
1 parent 1a43a68 commit 8f2f016
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions mistletoe/block_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -819,15 +819,17 @@ def match_link_title(cls, string, offset):
or '\n' in string[offset:new_offset]
and string[new_offset] == '['):
return offset, new_offset, ''
offset = new_offset
if string[offset] == '"':
if string[new_offset] == '"':
closing = '"'
elif string[offset] == "'":
elif string[new_offset] == "'":
closing = "'"
elif string[offset] == '(':
elif string[new_offset] == '(':
closing = ')'
else:
elif '\n' in string[offset:new_offset]:
return offset, offset, ''
else:
return None
offset = new_offset
escaped = False
for i, c in enumerate(string[offset+1:], start=offset+1):
if c == '\\' and not escaped:
Expand Down

0 comments on commit 8f2f016

Please sign in to comment.