Make `INI` syntax register as handler of `.inf` files

We need to type `inf` and `INF` as strings in `INI.sublime-syntax`,
otherwise `yaml-rust` interprets them as real numbers ("infinity") and
they do not get registered as file extensions:

    /Users/martin/src/yaml-rust # https://github.com/chyh1990/yaml-rust
    % cargo run --example dump_yaml ~/src/bat/assets/syntaxes/02_Extra/INI.sublime-syntax
    ---
    String("name"):
        String("INI")
    String("file_extensions"):
            String("ini")
            String("INI")
            Real("inf")
            Real("INF")
    ...

Also add a regression test.
This commit is contained in:
Martin Nordholts 2022-05-10 20:27:48 +02:00
parent dc7d5a862f
commit 5fe9b3e1b3
4 changed files with 13 additions and 2 deletions

View File

@ -28,6 +28,7 @@
- Associate `/var/spool/mail/*` and `/var/mail/*` with the `Email` syntax. See #2156 (@cyqsimon)
- Added cmd-help syntax to scope --help messages. See #2148 (@victor-gp)
- Slightly adjust Zig syntax. See #2136 (@Enselic)
- Associate `.inf` files with the `INI` syntax. See #2190 (@Enselic)
## Themes

View File

@ -5,8 +5,8 @@ name: INI
file_extensions:
- ini
- INI
- inf
- INF
- "inf"
- "INF"
- reg
- REG
- lng

View File

@ -0,0 +1,5 @@
[section]
key=value
# This file is just for testing that the INI syntax is registered to handle
# the .inf file extension, it is not testing the syntax highlighting capabilities
# of the INI syntax itself

View File

@ -0,0 +1,5 @@
[section]
key=value
# This file is just for testing that the INI syntax is registered to handle
# the .inf file extension, it is not testing the syntax highlighting capabilities
# of the INI syntax itself