Skip to content

Commit

Permalink
Move rule ID to end of diagnostic messages
Browse files Browse the repository at this point in the history
  • Loading branch information
me-johnomar authored and valentjn committed Jan 24, 2021
1 parent 42f7535 commit c7d4a26
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- Fix false positives for words added by `Add to dictionary` for Slovak rule IDs `MUZSKY_ROD_NEZIV_A`, `ZENSKY_ROD_A`, and `STREDNY_ROD_A` (fixes [vscode-ltex#221](https://github.com/valentjn/vscode-ltex/issues/221))
- Fix BibT<sub>E</sub>X 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 BibT<sub>E</sub>X 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))

## 9.1.0 (January 24, 2021)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ public Diagnostic createDiagnostic(LanguageToolRuleMatch match, LtexTextDocument
ret.setRange(new Range(document.convertPosition(match.getFromPos()),
document.convertPosition(match.getToPos())));
ret.setSeverity(this.settingsManager.getSettings().getDiagnosticSeverity());
ret.setSource("LTeX - " + match.getRuleId());
ret.setMessage(match.getMessage().replaceAll("<suggestion>(.*?)</suggestion>", "'$1'"));
ret.setSource("LTeX");
ret.setMessage(match.getMessage().replaceAll("<suggestion>(.*?)</suggestion>", "'$1'")
+ " \u2013 " + match.getRuleId());
return ret;
}

Expand Down

0 comments on commit c7d4a26

Please sign in to comment.