Skip to content

Fix markdown parsing in edge cases / Add task support#20

Merged
Ivansss merged 6 commits intomasterfrom
fix/noid/markdown-parsing
Mar 6, 2026
Merged

Fix markdown parsing in edge cases / Add task support#20
Ivansss merged 6 commits intomasterfrom
fix/noid/markdown-parsing

Conversation

@SystemKeeper
Copy link

Fixes:

  • Syntax with uneven backticks
  • Syntax with no end-backticks
  • Code inside syntax
  • Code inside links
  • Task support
  • Multline quotes

@SystemKeeper SystemKeeper requested a review from Ivansss March 6, 2026 10:29
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
Comment on lines -49 to -55
let attributes = attributedString.attributes(at: match.nsRange(atIndex: 3).lowerBound, effectiveRange: nil)

// Don't format parts of the string which already contain a link
if attributes.contains(where: { $0.key == .link}) {
return
}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's annoying me a bit. I did add that part when we first introduced the library, but we didn't have test case back then. I can't think of a case where we want to have it. Could also be, that the original case was fixed in the meantime.
Removing it for now, as otherwise code inside of links will not work for example.

@Ivansss Ivansss merged commit d70cb08 into master Mar 6, 2026
2 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.

2 participants