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

Add support for nested parentheses in links #170

Closed
Ambrevar opened this issue Oct 10, 2016 · 2 comments
Closed

Add support for nested parentheses in links #170

Ambrevar opened this issue Oct 10, 2016 · 2 comments
Labels

Comments

@Ambrevar
Copy link
Contributor

The fontification of the link stops at the first closing parenthesis, which is wrong when the link contains parenthesis itself.

[foo](bar(baz)qux)

I guess an easy fix would be to match against )\s, with \s being unicode spacing. (Not sure this is a valid Emacs regexps.)

@syohex
Copy link
Collaborator

syohex commented Jan 24, 2017

I think it is not easy to fix. Regular expression cannot handles nested pairs. I suppose we can fix this issue by using lambda expression matching instead of regular expression, however this is big change.

@Ambrevar
Copy link
Contributor Author

That's why I suggested the "easy fix". Don't bother with nested parentheses if URI cannot contain spacing (linebreak included), just match against )\s: the inner parenthesis will be included in the link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants