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

Use LatexAnnotatedTextBuilder on tex languageId #54

Merged
merged 4 commits into from
Apr 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- Add support for many L<sup>A</sup>T<sub>E</sub>X accents, enhance coverage of existing accents: double acute (e.g., `\H{O}`, &#x0150;), line below (e.g., `\b{h}`, &#x1e96;), cedilla (e.g., `\c{E}`, &#x0228;), dot below (e.g., `\d{A}`, &#x1ea0;), ogonek (e.g., `\k{A}`, &#x0104;), breve (e.g., `\u{A}`, &#x0102;), and caron (e.g., `\v{C}`, &#x010c;) ([PR #57](https://github.com/valentjn/ltex-ls/pull/57) by [@ed359](https://github.com/ed359), fixes [#56](https://github.com/valentjn/ltex-ls/issues/56))
- Add support for special L<sup>A</sup>T<sub>E</sub>X characters: `\L` (&#x0141;), `\SS` (&#x1e9e;), `\i` (&#x0131;), `\j` (&#x0237;), `\l` (&#x0142;) ([PR #57](https://github.com/valentjn/ltex-ls/pull/57) by [@ed359](https://github.com/ed359), fixes [#56](https://github.com/valentjn/ltex-ls/issues/56))
- Add `FR_SPELLING_RULE` as a rule for unknown words ([PR #47](https://github.com/valentjn/ltex-ls/pull/47) by [Nicolas Sicard (@biozic)](https://github.com/biozic))
- Add support for documents with code language ID `tex` ([PR #54](https://github.com/valentjn/ltex-ls/pull/54) by [Lucas Alber (@LDAP)](https://github.com/LDAP), fixes [#53](https://github.com/valentjn/ltex-ls/issues/53))
- Ignore non-object values for `InitializeParams.initializationOptions` (fixes [#65](https://github.com/valentjn/ltex-ls/issues/65))

## 10.0.0 (February 12, 2021)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public abstract class CodeAnnotatedTextBuilder extends AnnotatedTextBuilder {
new PlaintextAnnotatedTextBuilder());
constructorMap.put("rsweave", (String codeLanguageId) ->
new LatexAnnotatedTextBuilder(codeLanguageId));
constructorMap.put("tex", (String codeLanguageId) ->
new LatexAnnotatedTextBuilder(codeLanguageId));
}

public static CodeAnnotatedTextBuilder create(String codeLanguageId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public abstract class CodeFragmentizer {
new PlaintextFragmentizer(codeLanguageId));
constructorMap.put("rsweave", (String codeLanguageId) ->
new LatexFragmentizer(codeLanguageId));
constructorMap.put("tex", (String codeLanguageId) ->
new LatexFragmentizer(codeLanguageId));
}

public CodeFragmentizer(String codeLanguageId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ public void testRsweave() {
testCodeLanguage("rsweave");
}

@Test
public void testTex() {
testCodeLanguage("tex");
}

@Test
public void testBabel() {
CodeFragmentizer fragmentizer = CodeFragmentizer.create("latex");
Expand Down