Skip to content

Fix incorrect parsing of links after square brackets (#552)#556

Merged
nicholasserra merged 2 commits intotrentm:masterfrom
Crozzers:fix-issue-552
Dec 17, 2023
Merged

Fix incorrect parsing of links after square brackets (#552)#556
nicholasserra merged 2 commits intotrentm:masterfrom
Crozzers:fix-issue-552

Conversation

@Crozzers
Copy link
Copy Markdown
Contributor

This PR fixes #552.

The issue was with links following square brackets, eg: [text][link](google.com). The link parser would hit [text][link] and correctly identify that this isn't a valid link. It would then set the current position counter to the end of the entire "match", which included the section containing the valid link.

I've changed it to set the current position to directly after the first square brackets, so that it picks up on the link right after

Links parser would identify the first square brackets as invalid link and then continue from after the entire link, which skipped the valid link right next to the brackets
@nicholasserra
Copy link
Copy Markdown
Collaborator

Thank you!

@nicholasserra nicholasserra merged commit 5ddad68 into trentm:master Dec 17, 2023
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.

Link Conversion Fails with Preceding or Following Square Brackets

2 participants