(Go: >> BACK << -|- >> HOME <<)

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

Escape trailing slashes on patterns #185

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wbthomason
Copy link

Some matcher patterns from LSP servers (e.g. https://texlab.netlify.com/) end with \. A trailing unescaped \ in a pattern causes an error with Python's regex matcher.

This patch checks if a match pattern has an odd number of trailing backslashes and, if so, adds another to escape the trailing slash.

To test the bug this fixes, try using texlab with the Neovim native LSP, with and without this patch. Without the patch, ncm2 will crash. With the patch, you should get completions as expected.

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.

None yet

1 participant