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

Grazie support misses mistakes in text #1153

Closed
fberlakovich opened this issue Dec 27, 2019 · 3 comments · Fixed by #1196
Closed

Grazie support misses mistakes in text #1153

fberlakovich opened this issue Dec 27, 2019 · 3 comments · Fixed by #1196
Assignees
Labels
bug Deficiencies in TeXiFy behaviour.
Milestone

Comments

@fberlakovich
Copy link
Contributor

Type of JetBrains IDE (IntelliJ, PyCharm, etc.) and version

IntelliJ 2019.3.1

Operating System (Windows, Linux, MacOS, etc.)

Windows

TeXiFy IDEA version

Git master (787bac7)

What I did (steps to reproduce)

Spellcheck a simple latex document:

% Preamble
\documentclass[11pt]{article}
\usepackage{natbib}

% Document
\begin{document}

    % Those is a problem in a comment

    Those is a problem in text

\end{document}

Expected behavior

Grazie should detect the "Those is" error in both cases

Actual behavior

Grazie only detects the error in the comment

The issue seems to be in the isTypoAccepted method of the LatexGrammarCheckingStrategy. If I replace the current implementation with one that simply returns true, the error is correctly detected in both lines. Unfortunately I don't really understand what this method is supposed to do and what the current implementation does. @TanVD could you explain why you implemented it in the current way?

@PHPirates PHPirates added the bug Deficiencies in TeXiFy behaviour. label Dec 27, 2019
@fberlakovich
Copy link
Contributor Author

Ok, I started looking at this issue now. I will give an update as soon as I have more information.

@fberlakovich
Copy link
Contributor Author

Ok, I started looking at this issue now. I will give an update as soon as I have more information.

Progress update: I fixed the issue with the GrammarCheckingStrategy now (test included), but there is also an issue with the LatexCompileGutter that produces error logs and prevents the test from succeeding. I will look into it

@TanVD
Copy link
Contributor

TanVD commented Jan 28, 2020

Sorry for the late reply, this line was migrated from XML Grammar Checking strategy and was meant to fix errors that may occur around template variables.
For example, in situations like Here you see that ${123} is a number -- Grazie may consider such sentence as two that are split by template.
But it may be that in Latex such situations are not very common :) And yeah, because of this hack Grazie could ignore some errors that now will be detected.

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

Successfully merging a pull request may close this issue.

3 participants