on master help sign in
Add support for comments after section headers (closes #1259)

There's no canonical definition of what's the INI syntax, but Python's `ConfigParser` supports comments after section headers: ```ini [section] ; comment ```

commit5e0b7f013ac636bb6e37b3bfcb4769c8bdf5b406 authorNiklas Sombert <niklas@ytvwld.de> dateMon 5 Oct 2020, 17:52 (6 years ago) parentaa205c6
2 files changed+3−2
assets/README.md+1−1 assets/syntaxes/02_Extra/INI.sublime-syntax+2−1
assets/README.md+1−1
@@ -33,7 +33,7 @@ The following files have been manually modified after converting from a `.tmLang
3333
3434* `Apache.sublime_syntax`=> removed `.conf` and `.CONF` file types.
3535* `Dart.sublime-syntax` => removed `#regex.dart` include.
36−* `INI.sublime-syntax` => added `.hgrc`, `hgrc`, and `desktop` file types.
36+* `INI.sublime-syntax` => added `.hgrc`, `hgrc`, and `desktop` file types and support for comments after section headers
3737* `Org mode.sublime-syntax` => removed `task` file type.
3838* `SML.sublime_syntax` => removed `ml` file type.
3939
assets/syntaxes/02_Extra/INI.sublime-syntax+2−1
@@ -25,12 +25,13 @@ contexts:
2525 scope: comment.line.semicolon.ini
2626 captures:
2727 1: punctuation.definition.comment.ini
28− - match: '^\s*(\[)(.*?)(\])'
28+ - match: '^\s*(\[)(.*?)(\])\s*(;.*)?$\n?'
2929 scope: meta.tag.section.ini
3030 captures:
3131 1: punctuation.definition.section.ini
3232 2: entity.section.ini
3333 3: punctuation.definition.section.ini
34+ 4: comment.definition.section.ini
3435 - match: '^(\s*(["'']?)(.+?)(\2)\s*(=))?\s*((["'']?)(.*?)(\7))\s*(;.*)?$\n?'
3536 scope: meta.declaration.ini
3637 captures: