8000 Fix link reference definition parsing with invalid title by robinst · Pull Request #318 · commonmark/commonmark-java · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix link reference definition parsing with invalid title #318

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 priv 8000 acy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 6, 2024
Merged

Conversation

robinst
Copy link
Collaborator
@robinst robinst commented Apr 6, 2024

An input like this:

[foo]: /url
"title" bad

Means the second line is just a paragraph because only spaces/tabs are allowed after a title. The parser used to set the title to "title" in this case and assign the source span of the second line to the definition, which is wrong.

Fixes #315.

An input like this:

```
[foo]: /url
"title" bad
```

Means the second line is just a paragraph because only spaces/tabs are allowed
after a title. The parser used to set the title to "title" in this case and
assign the source span of the second line to the definition, which is wrong.

Fixes #315.
Copy link
codecov bot commented Apr 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.25%. Comparing base (ef730f6) to head (b570e1b).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #318   +/-   ##
=========================================
  Coverage     94.25%   94.25%           
  Complexity      254      254           
=========================================
  Files           131      131           
  Lines          4178     4181    +3     
  Branches        614      614           
=========================================
+ Hits           3938     3941    +3     
  Misses          127      127           
  Partials        113      113           
Files Coverage Δ
...onmark/internal/LinkReferenceDefinitionParser.java 97.03% <100.00%> (+0.06%) ⬆️

@robinst robinst merged commit 1bf85c6 into main Apr 6, 2024
@robinst robinst deleted the issue-315 branch April 6, 2024 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LinkReferenceDefinition takes over sourceSpans from a block following it
1 participant
0