Skip to content

Commit

Permalink
Disable UPPERCASE_SENTENCE_START in BibTeX
Browse files Browse the repository at this point in the history
  • Loading branch information
valentjn committed Jan 24, 2021
1 parent bc7f24c commit e0ff977
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,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))

## 9.1.0 (January 24, 2021)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ private List<CodeFragment> fragmentizeBibtexFields(List<CodeFragment> fragments)
for (CodeFragment oldFragment : fragments) {
String oldFragmentCode = oldFragment.getCode();
Settings oldFragmentSettings = oldFragment.getSettings();

Set<String> newFragmentDisabledRules = new HashSet<>(oldFragmentSettings.getDisabledRules());
newFragmentDisabledRules.add("UPPERCASE_SENTENCE_START");
Settings newFragmentSettings = oldFragmentSettings.withDisabledRules(
newFragmentDisabledRules);

bibtexEntryCommandSignatureMatcher.startMatching(oldFragmentCode, Collections.emptySet());
@Nullable LatexCommandSignatureMatch match = null;
@Nullable Map<String, Boolean> bibtexFields = null;
Expand All @@ -82,7 +88,7 @@ private List<CodeFragment> fragmentizeBibtexFields(List<CodeFragment> fragments)

newFragments.add(new CodeFragment("latex", keyValuePair.getValue(),
oldFragment.getFromPos() + argumentContentsFromPos + keyValuePair.getValueFromPos(),
oldFragmentSettings));
newFragmentSettings));
}
}
}
Expand Down

0 comments on commit e0ff977

Please sign in to comment.