Skip to content

Commit

Permalink
Fix .rst not recognized by _ltex.checkDocument
Browse files Browse the repository at this point in the history
  • Loading branch information
valentjn committed Apr 10, 2021
1 parent 0ba32c2 commit be52909
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,12 @@ public CompletableFuture<Object> executeCheckDocumentCommand(JsonObject argument

if (fileNameStr.endsWith(".bib")) {
codeLanguageId = "bibtex";
} else if (fileNameStr.endsWith(".md")) {
codeLanguageId = "markdown";
} else if (fileNameStr.endsWith(".rst")) {
codeLanguageId = "restructuredtext";
} else if (fileNameStr.endsWith(".tex")) {
codeLanguageId = "latex";
} else if (fileNameStr.endsWith(".md")) {
codeLanguageId = "markdown";
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public void testCheckDocument() throws IOException, InterruptedException, Execut
assertCheckDocumentResult("invalid_uri", false);
assertCheckDocumentResult("file:///non_existent_path", false);

for (String extension : Arrays.asList(".bib", ".md", ".tex")) {
for (String extension : Arrays.asList(".bib", ".md", ".rst", ".tex")) {
File tmpFile = File.createTempFile("ltex-", extension);

try {
Expand Down

0 comments on commit be52909

Please sign in to comment.