Skip to content

Commit 263d17c

Browse files
committed
Do some cleanup and update changelog
1 parent 610631e commit 263d17c

File tree

2 files changed

+1
-20
lines changed

2 files changed

+1
-20
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.4 (not yet released)
44

5-
(nothing yet)
5+
- [pull #617] Add MarkdownFileLinks extra (#528)
66

77

88
## python-markdown2 2.5.3

lib/markdown2.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1447,25 +1447,6 @@ def _find_balanced(self, text: str, start: int, open_c: str, close_c: str) -> in
14471447
i += 1
14481448
return i
14491449

1450-
def _extract_url_and_title(self, text: str, start: int) -> Union[tuple[str, str, int], tuple[None, None, None]]:
1451-
"""Extracts the url and (optional) title from the tail of a link"""
1452-
# text[start] equals the opening parenthesis
1453-
idx = self._find_non_whitespace(text, start+1)
1454-
if idx == len(text):
1455-
return None, None, None
1456-
end_idx = idx
1457-
has_anglebrackets = text[idx] == "<"
1458-
if has_anglebrackets:
1459-
end_idx = self._find_balanced(text, end_idx+1, "<", ">")
1460-
end_idx = self._find_balanced(text, end_idx, "(", ")")
1461-
match = self._inline_link_title.search(text, idx, end_idx)
1462-
if not match:
1463-
return None, None, None
1464-
url, title = text[idx:match.start()], match.group("title")
1465-
if has_anglebrackets:
1466-
url = self._strip_anglebrackets.sub(r'\1', url)
1467-
return url, title, end_idx
1468-
14691450
# https://developer.mozilla.org/en-US/docs/web/http/basics_of_http/data_urls
14701451
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types
14711452
_data_url_re = re.compile(r'''

0 commit comments

Comments
 (0)