Jump to matching parenthesis works on line **2** but not on **4**, yet line **4** is valid java while **2** is not.
![image](https://github.com/user-attachments/assets/fabe0179-0cf9-48e0-9799-6d1c47cb2...)
(built on or after 2024-03-31) Using GTK+ v3.24.41 and GLib v2.80.0 runtime libraries
The highlighting for Java is using the C lexer as there is no Java lexer available.
C only knows about strings between pairs of `""` _on the same line_ so line 2 is valid C containing three empty strings and the `()`s are outside strings. On line 4 there is an empty string and an invalid string opened by `"` and ending at the end of the line. On line 5 again there is an empty string and an invalid string opened by `"` and ending at the end of the line and including the `);` as part of the string and so the `)` on line 5 is part of a string and so not seen as a matching close parentheses for the `(` on line 4.
Unless "somebody" contributes to the highlighter to the [Lexilla](https://github.com/ScintillaOrg/lexilla) project there may be places that Java and C have diverged, and triple `"""` is one that is not valid C.
"Nobody" has to contribute anything to Lexilla - it's already there:
https://github.com/ScintillaOrg/lexilla/blob/0784d05075bd85cf151c480c0853771...
All that's needed is to add ```ini lexer.cpp.triplequoted.strings=1 ``` under ```ini [lexer_properties=C] ``` in Tools->Configuration files->Filetype configuration->Programming languages->filetypes.java
Closed #3995 as completed via 2cccabfac66d6f2e0daba3eeb17dad0795d7b22e.
Closed #3995 as completed via #4000.
github-comments@lists.geany.org