diff options
-rw-r--r-- | pygments/lexers/other.py | 2 | ||||
-rw-r--r-- | tests/examplefiles/example.pp | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/pygments/lexers/other.py b/pygments/lexers/other.py index c308c884..227352d9 100644 --- a/pygments/lexers/other.py +++ b/pygments/lexers/other.py @@ -3391,7 +3391,7 @@ class PuppetLexer(RegexLexer): 'strings': [ (r'"([^"])*"', String), - (r'\'([^\'])*\'', String), + (r"'(\\'|[^'])*'", String), ], } diff --git a/tests/examplefiles/example.pp b/tests/examplefiles/example.pp new file mode 100644 index 00000000..ea697be2 --- /dev/null +++ b/tests/examplefiles/example.pp @@ -0,0 +1,8 @@ +exec { 'grep': + command => 'grep "\'" -rI *', + path => '/bin:/usr/bin', +} + +node default { + notify {"Hello World":;} +} |