summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pygments/lexers/text.py2
-rw-r--r--tests/examplefiles/test.ini10
2 files changed, 11 insertions, 1 deletions
diff --git a/pygments/lexers/text.py b/pygments/lexers/text.py
index 074794c8..5a63e503 100644
--- a/pygments/lexers/text.py
+++ b/pygments/lexers/text.py
@@ -42,7 +42,7 @@ class IniLexer(RegexLexer):
(r'\s+', Text),
(r'[;#].*?$', Comment),
(r'\[.*?\]$', Keyword),
- (r'(.*?)([ \t]*)(=)([ \t]*)(.*?)$',
+ (r'(.*?)([ \t]*)(=)([ \t]*)(.*(?:\n[ \t].+)*)',
bygroups(Name.Attribute, Text, Operator, Text, String))
]
}
diff --git a/tests/examplefiles/test.ini b/tests/examplefiles/test.ini
new file mode 100644
index 00000000..a447803d
--- /dev/null
+++ b/tests/examplefiles/test.ini
@@ -0,0 +1,10 @@
+[section]
+
+foo = bar
+continued = foo
+ baz
+conttwo =
+ foo
+; comment
+# comment
+