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

False-positive SENTENCE_WHITESPACE with two sentences in two arguments of a command #843

Open
MrEbbinghaus opened this issue Jul 17, 2023 · 0 comments
Labels
1-bug 🐛 Issue type: Bug report (something isn't working as expected) 2-unconfirmed Issue status: Bug that needs to be reproduced (all new bugs have this label)

Comments

@MrEbbinghaus
Copy link

Describe the bug
Two sentences in two parameter fields get checked like they are next to each other, without whitespace, resulting in a false-positive SENTENCE_WHITESPACE.
Both parameters should be checked and at least \caption does not appear inline, so a custom ltex.latex.commands won't help.

\caption[This is a short caption.]{This is the long caption, that is shown below the figure and that can be quite long. It can also contain multiple sentences.}
% gets treated like:
This is a short caption.This is the long caption, that is shown below the figure and that can be quite long. It can also contain multiple sentences.

image

Expected behavior
Two parameters should be checked as if there were separated by a white space.
I can only think of synthetic situations where this would result in a false-negative, and even then I think treating two parameters as separated by white space is correct in more situations.

Sample document

\caption[This is a short caption.]{This is the long caption, that is shown below the figure and that can be quite long. It can also contain multiple sentences.}

LTeX configuration
nothing of relevance

"LTeX Language Server" log file

Juli 17, 2023 8:03:19 NACHM. org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
FEIN: Checking the following text in language 'en-GB' via LanguageTool: "[This is a short caption.]This is the long caption, that is shown below the figure and that can be q"... (truncated to 100 characters)
Juli 17, 2023 8:03:19 NACHM. org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
FEIN: Obtained 1 rule match

Version information
List here the version information of the relevant software.

  • Operating system: macOS 13.4.1 (c) (22F770820d)
  • VS Code: 1.80.1
  • vscode-ltex: 13.1.0
  • ltex-ls: 15.2.0 (only if not using ltex-ls automatically downloaded by LTeX)
  • Java: 11.0.2 (usually obtained with java -version, only if not using Java automatically downloaded by LTeX)
@MrEbbinghaus MrEbbinghaus added 1-bug 🐛 Issue type: Bug report (something isn't working as expected) 2-unconfirmed Issue status: Bug that needs to be reproduced (all new bugs have this label) labels Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-bug 🐛 Issue type: Bug report (something isn't working as expected) 2-unconfirmed Issue status: Bug that needs to be reproduced (all new bugs have this label)
Projects
None yet
Development

No branches or pull requests

1 participant