diff --git a/CHANGELOG.md b/CHANGELOG.md index 4da7f212..7153d969 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - Fix BibTEX field `seealso` not ignored, ignore `category` and `parent` (see [vscode-ltex#211](https://github.com/valentjn/vscode-ltex/issues/211)) - Disable `UPPERCASE_SENTENCE_START` in BibTEX files (see [vscode-ltex#211](https://github.com/valentjn/vscode-ltex/issues/211)) - Move rule ID to the end of diagnostic messages as VS Code truncates the messages if the Problems panel is narrow (fixes [vscode-ltex#233](https://github.com/valentjn/vscode-ltex/issues/233)) +- Fix regression that messages of possible spelling mistakes are not prepended with the respective unknown words (see [vscode-ltex#161](https://github.com/valentjn/vscode-ltex/issues/161)) ## 9.1.0 (January 24, 2021) diff --git a/ltexls-core/src/main/java/org/bsplines/ltexls/languagetool/LanguageToolRuleMatch.java b/ltexls-core/src/main/java/org/bsplines/ltexls/languagetool/LanguageToolRuleMatch.java index 1ddd45d7..e8f44fde 100644 --- a/ltexls-core/src/main/java/org/bsplines/ltexls/languagetool/LanguageToolRuleMatch.java +++ b/ltexls-core/src/main/java/org/bsplines/ltexls/languagetool/LanguageToolRuleMatch.java @@ -51,7 +51,7 @@ public LanguageToolRuleMatch(@Nullable String ruleId, @Nullable String sentence, this.message = "'" + unknownWord + "': " + this.message; } - this.message = twoOrMoreSpacesPattern.matcher(message).replaceAll(" ").trim(); + this.message = twoOrMoreSpacesPattern.matcher(this.message).replaceAll(" ").trim(); } public @Nullable String getRuleId() {