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

Backslash + Special Char = Shifted Highlight #132

Closed
dejanzelic opened this issue May 4, 2020 · 5 comments · Fixed by #134
Closed

Backslash + Special Char = Shifted Highlight #132

dejanzelic opened this issue May 4, 2020 · 5 comments · Fixed by #134
Assignees
Labels
bug Something isn't working

Comments

@dejanzelic
Copy link

dejanzelic commented May 4, 2020

Describe the bug
When, for example, a "\" is added in a document, the remaining text is shifted by amount of "\". This isn't only on "\_" but any combination of backslash + some special chars. For example: "\;" or "\-"

To Reproduce
Steps to reproduce the behavior:

  1. Write a document with some level of spelling/grammar errors
  2. Before the errors, write "\_"
  3. Observe errors after "\_" are not highlighted as expected.

Expected behavior
The Highlights should stay consistent regardless of the text that is used.

Screenshots
image

Environment & Configuration (please complete the following information):

@dejanzelic dejanzelic added the bug Something isn't working label May 4, 2020
@davidlday
Copy link
Owner

Thanks for the bug report! Bumping this to the top of my list and tagging as possible cause of #120

@davidlday
Copy link
Owner

LanguageTool server accepts JSON in a form data field (application/x-www-form-urlencoded). This URL encoding sees slashes as escaping the next character if it's one of the special characters. I may need to open an issue on LanguageTool. I think if they're going to accept JSON, but need to explore more.

@davidlday
Copy link
Owner

Seems to be related to remarkjs/remark#306 from 2017. Will continue to see if there's a workaround I can implement.

@davidlday
Copy link
Owner

After thinking this through and testing out a few approaches, I've decided to address in the annotatedtext-remark library directly. The problem stems from the parser used there, and trying to fix it here corrupts the code.

Ref: prosegrinder/annotatedtext-remark#26

@dejanzelic
Copy link
Author

Thanks for the update!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants