8000 fix: reference-style link will not render if the reference is the last line in file by frostming · Pull Request #197 · frostming/marko · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: reference-style link will not render if the reference is the last line in file #197

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 18, 2024
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: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## Unreleased

### Fixed

- Reference link will not render if the reference definition doesn't end with newline.

## v2.1.0(2024-06-13)

### Changed
Expand Down
6 changes: 4 additions & 2 deletions marko/inline_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,9 @@ def _parse_link_dest_title(
else:
escaped = False
pairs = 0
i = 0
for i, c in enumerate(link_text[start:], start):
i = start
while i < len(link_text):
c = link_text[i]
if escaped:
escaped = False
elif c == "\\":
Expand All @@ -322,6 +323,7 @@ def _parse_link_dest_title(
return link_dest, _EMPTY_GROUP
else:
raise ParseError("unmatched parenthesis")
i += 1
else:
if is_inline:
raise ParseError("No right parenthesis is found")
Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
os.environ.update(PDM_IGNORE_SAVED_PYTHON="1")


@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11"])
@nox.session(python=["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"])
def tests(session):
session.run("pdm", "install", "-d", external=True)
session.run("pytest", "tests/")
Expand Down
Loading
0