asciidoctor / atom-language-asciidoc

⚛ AsciiDoc language package for the Atom editor.
https://atom.io/packages/language-asciidoc
MIT License
42 stars 20 forks source link

Java try with resource syntax highlighting #190

Closed garyrussell closed 6 years ago

garyrussell commented 6 years ago

Description

A code snippet with Java "try with resource" does not terminate highlighting when exiting block.

Screenshots

screen shot 2018-06-19 at 1 02 50 pm

Syntax example

[source,java]
----
public void foo(String in) {
    try (FileInputStream is = new FileInputStream("/tmp/foo")) {
        is.read();
    }
    catch (Exception e) {
        throw new RuntimeException(e);
    }
}
----

Test foo bar.
mojavelinux commented 6 years ago

This needs to be reported here: https://github.com/atom/language-java. This language simply delegates to that language, so if that language grammar does not terminate, the parsing bleeds outside of the listing block.

garyrussell commented 6 years ago

Sorry; will do.

garyrussell commented 6 years ago

Thanks.

Existing issue https://github.com/atom/language-java/issues/88 there.