mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[Grazie][IDEA-331054] Incorrect missing apostrophe warnings inside markup
GitOrigin-RevId: ef4008f271a9d76030d048e3fd7645176372d7ea
This commit is contained in:
committed by
intellij-monorepo-bot
parent
5a47f05dc0
commit
9e2bfb4413
@@ -119,7 +119,10 @@ open class LanguageToolChecker : TextChecker() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun possiblyMarkupDependent(match: RuleMatch) = match.message.lowercase().contains("capitalize")
|
||||
private fun possiblyMarkupDependent(match: RuleMatch): Boolean {
|
||||
return match.message.lowercase().contains("capitalize") ||
|
||||
match.rule.id == "POSSESSIVE_APOSTROPHE"
|
||||
}
|
||||
|
||||
private fun runLT(tool: JLanguageTool, str: String): List<RuleMatch> =
|
||||
tool.check(AnnotatedTextBuilder().addText(str).build(), true, JLanguageTool.ParagraphHandling.NORMAL,
|
||||
|
||||
@@ -37,6 +37,9 @@ val b = "It is friend."
|
||||
It's a <GRAMMAR_ERROR descr="A_GOOGLE">react</GRAMMAR_ERROR> method. (An LT warning here)
|
||||
It's a *react* method. (Fine, as it's emphasized)
|
||||
|
||||
They are stored in the <GRAMMAR_ERROR descr="POSSESSIVE_APOSTROPHE">images</GRAMMAR_ERROR> directory.
|
||||
They are stored in the **images** directory. (Shouldn't suggest inserting apostrophe inside markup)
|
||||
|
||||
Defined field String name = "John<GRAMMAR_ERROR descr="EN_QUOTES">"</GRAMMAR_ERROR>
|
||||
System.out.println(<GRAMMAR_ERROR descr="EN_QUOTES">"</GRAMMAR_ERROR>Hello <GRAMMAR_ERROR descr="EN_QUOTES">"</GRAMMAR_ERROR> + name)
|
||||
foo(<GRAMMAR_ERROR descr="THE_PUNCT">a,</GRAMMAR_ERROR> <GRAMMAR_ERROR descr="THE_PUNCT">the,</GRAMMAR_ERROR> an)
|
||||
|
||||
Reference in New Issue
Block a user