mirror of
https://github.com/sharkdp/bat
synced 2026-08-11 20:11:43 +00:00
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:
@@ -28,6 +28,7 @@
|
|||||||
- Associate `/var/spool/mail/*` and `/var/mail/*` with the `Email` syntax. See #2156 (@cyqsimon)
|
- 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)
|
- Added cmd-help syntax to scope --help messages. See #2148 (@victor-gp)
|
||||||
- Slightly adjust Zig syntax. See #2136 (@Enselic)
|
- Slightly adjust Zig syntax. See #2136 (@Enselic)
|
||||||
|
- Associate `.inf` files with the `INI` syntax. See #2190 (@Enselic)
|
||||||
|
|
||||||
## Themes
|
## Themes
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -5,8 +5,8 @@ name: INI
|
|||||||
file_extensions:
|
file_extensions:
|
||||||
- ini
|
- ini
|
||||||
- INI
|
- INI
|
||||||
- inf
|
- "inf"
|
||||||
- INF
|
- "INF"
|
||||||
- reg
|
- reg
|
||||||
- REG
|
- REG
|
||||||
- lng
|
- lng
|
||||||
|
|||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
[38;2;248;248;242m[[0m[38;2;166;226;46msection[0m[38;2;248;248;242m][0m
|
||||||
|
[38;2;249;38;114mkey[0m[38;2;248;248;242m=[0m[38;2;230;219;116mvalue[0m
|
||||||
|
[38;2;117;113;94m#[0m[38;2;117;113;94m This file is just for testing that the INI syntax is registered to handle[0m
|
||||||
|
[38;2;117;113;94m#[0m[38;2;117;113;94m the .inf file extension, it is not testing the syntax highlighting capabilities[0m
|
||||||
|
[38;2;117;113;94m#[0m[38;2;117;113;94m of the INI syntax itself[0m
|
||||||
+5
@@ -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
|
||||||
Reference in New Issue
Block a user