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

nicer handling of matched brackets in link labels #183

Open
yshavit opened this issue Aug 15, 2024 · 0 comments
Open

nicer handling of matched brackets in link labels #183

yshavit opened this issue Aug 15, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@yshavit
Copy link
Owner

yshavit commented Aug 15, 2024

This is a followup to #88. For the resolution on that one, we just escape all brackets, in both img alt and link labels. This is correct, but a nicer formatting would be to find matched brackets and not escape them.

The following two links are equivalent:

[link [foo [bar]]](https://example.com)
[link \[foo \[bar\]\]](https://example.com)

Today, we always output the bottom one; but where we can, it'd be nice to output the top one instead.

@yshavit yshavit added the enhancement New feature or request label Aug 15, 2024
yshavit added a commit that referenced this issue Aug 15, 2024
Fixes #88

We could output things a bit nicer, but I'm deferring that to #183. The
approach in this change is functionally correct.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant