-
Notifications
You must be signed in to change notification settings - Fork 52
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
[bug] texlab considers links containing %
in \href
as a comment
#1279
Comments
You can escape the
Alternatively, you can use a space instead of
Both of these produce the desired result without the diagnostic. The hyperref documentation says:
I read this to mean that hyperref does not care if you escape the |
Alright, thanks. I assume there is no intention to support having these characters as is (without escaping them) then? |
I’m open to working on it if you have a suggestion for how to do it. I thought about it for a bit and it’s not obvious to me how to do it without some complicated look ahead while walking the tree. @pfoerster thoughts? |
Great, thanks a lot! I am very new to LSPs, I'll let you know if I come up with something. |
I think you need to do this at the parser/lexer level and introduce a |
I think I have this working now, and I've added one unit test for this command:
I could use suggestions for other test cases to check before I push a PR. |
also maybe adding support for and, not sure how much of use it would be, but what about a unit test such as,
|
Links to files containing spaces contain
%
, and\href
allows you to insert the link as is. texlab seems to understand it as a comment and considers the{
from\href
to not be closed, therefore giving an error expecting a}
.Reproducible example:
Thanks!
The text was updated successfully, but these errors were encountered: