Skip to content

Commit

Permalink
Merge pull request #54 from LDAP/patch-1
Browse files Browse the repository at this point in the history
Use LatexAnnotatedTextBuilder on `tex` languageId
  • Loading branch information
valentjn authored Apr 5, 2021
2 parents 66938df + fa7ef20 commit 6525857
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
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

0 comments on commit 6525857

Please sign in to comment.