Skip to content
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

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

Merged
merged 2 commits into from Dec 17, 2023

Conversation

Crozzers
Copy link
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
Collaborator

Thank you!

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