File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -14,20 +14,23 @@ class INI < RegexLexer
1414 identifier = /[\w \- .]+/
1515
1616 state :basic do
17+ rule %r/\s +/ , Text ::Whitespace
1718 rule %r/[;#].*?\n / , Comment
18- rule %r/\s +/ , Text
1919 rule %r/\\ \n / , Str ::Escape
2020 end
2121
2222 state :root do
2323 mixin :basic
2424
2525 rule %r/(#{ identifier } )(\s *)(=)/ do
26- groups Name ::Property , Text , Punctuation
26+ groups Name ::Property , Text :: Whitespace , Punctuation
2727 push :value
2828 end
2929
3030 rule %r/\[ .*?\] / , Name ::Namespace
31+
32+ # standalone option, supported by some INI parsers
33+ rule %r/(.+?)/ , Name ::Attribute
3134 end
3235
3336 state :value do
Original file line number Diff line number Diff line change @@ -70,6 +70,14 @@ EGA40WOA.FON=EGA40WOA.FON
7070CGA80WOA.FON=CGA80WOA.FON
7171CGA40WOA.FON=CGA40WOA.FON
7272
73+ # HAProxy config
74+ global
75+ daemon
76+ maxconn 256
77+
78+ defaults
79+ mode http
80+
7381## Other ##
7482[section-name]
7583foo-bar_ = baz
You can’t perform that action at this time.
0 commit comments