RSyntaxTextArea icon indicating copy to clipboard operation
RSyntaxTextArea copied to clipboard

INI files syntax highlighting

Open sesquialtera87 opened this issue 7 months ago • 0 comments
trafficstars

Description

  • When a value contains a section-like sequence of characters (for example a=[1,2,3]), they are recognized and rendered as an ini-section token and I think it shouldn't be that way.
  • When a value begin contains one of the comment's start tokens (for example color="#33aa4b"), it is always recognized as an inline-comment, regardless of whether the string is single/double quoted or not.

Actual behavior Image As you can see from the screenshot, the value "#ff44bb" is misinterpreted as a comment and the characters forming the object value are rendered as a section.

Expected behavior Image

  • Everything appearing between square brackets should be renderer as a value when it isn't the first token in a line (i.e. a section).
  • Single or double quoted can maybe be treated as another token kind, such as a string token (or simply as a common value) but quotation should prevent # and ; to be interpreted as the beginning of a comment.

Java version OpenJDK Runtime Environment (build 21.0.3+10-LTS)

I tried to fix the two issues (see the second screenshot). If could be useful, I can submit a pull request with the changes to the IniTokenMaker

sesquialtera87 avatar Mar 27 '25 18:03 sesquialtera87