Skip to content

Commit

Permalink
Fix small bug with line continuation.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmzambon committed Aug 28, 2022
1 parent 661f51f commit b54962b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pygments/lexers/configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ class IniLexer(RegexLexer):
(r'(.+?)$', Name.Attribute),
],
'value': [ # line continuation
(r'[^;#=]+(?<!\\)\n', String, "#pop"),
(r'.*\\[ \t]*\n', String),
(r'.*$', String, "#pop"),
],
}

Expand Down
2 changes: 2 additions & 0 deletions tests/examplefiles/ini/test.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ conttwo =

my_array = Asia, Africa, 'North America', South America, \
Antarctica, Europe, Australia

implicit_boolean
foo = bar
6 changes: 5 additions & 1 deletion tests/examplefiles/ini/test.ini.output

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b54962b

Please sign in to comment.