Skip to content

Commit

Permalink
Add support for colon separator.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmzambon committed Aug 31, 2022
1 parent eaf0963 commit cb4543d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pygments/lexers/configs.py
Expand Up @@ -45,11 +45,11 @@ class IniLexer(RegexLexer):
'root': [
(r'\s+', Whitespace),
(r'[;#].*', Comment.Single),
(r'\[.*?\]$', Keyword),
(r'(.*?)([  \t]*)(=)([  \t]*)([^;#\n]*)(\\)(\s+)',
(r'(\[.*?\])([ \t]*)$', bygroups(Keyword, Whitespace)),
(r'(.*?)([  \t]*)([=:])([  \t]*)([^;#\n]*)(\\)(\s+)',
bygroups(Name.Attribute, Whitespace, Operator, Whitespace, String, Text, Whitespace),
"value"),
(r'(.*?)([  \t]*)(=)([  \t]*)([^ ;#\n]*(?: [^ ;#\n]+)*)',
(r'(.*?)([  \t]*)([=:])([  \t]*)([^ ;#\n]*(?: +[^ ;#\n]+)*)',
bygroups(Name.Attribute, Whitespace, Operator, Whitespace, String)),
# standalone option, supported by some INI parsers
(r'(.+?)$', Name.Attribute),
Expand Down

0 comments on commit cb4543d

Please sign in to comment.