summaryrefslogtreecommitdiff
path: root/pygments/lexers/data.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-10-15 21:32:31 +0200
committerGeorg Brandl <georg@python.org>2014-10-15 21:32:31 +0200
commit10be9bec8a7969a40d4fa3483b8317e0131b1715 (patch)
tree7047dd543253b4a5f0002c377cce59e3589a2aeb /pygments/lexers/data.py
parent6095eb22ab78b1754aeb56d67754cc4cb401e843 (diff)
downloadpygments-10be9bec8a7969a40d4fa3483b8317e0131b1715.tar.gz
all lexers: fix unescaped { and } so that the "regex" module can compile our regexes
Diffstat (limited to 'pygments/lexers/data.py')
-rw-r--r--pygments/lexers/data.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pygments/lexers/data.py b/pygments/lexers/data.py
index 6ea331f6..22821c15 100644
--- a/pygments/lexers/data.py
+++ b/pygments/lexers/data.py
@@ -476,14 +476,14 @@ class JsonLexer(RegexLexer):
# comma terminates the attribute but expects more
(r',', Punctuation, '#pop'),
# a closing bracket terminates the entire object, so pop twice
- (r'}', Punctuation, ('#pop', '#pop')),
+ (r'\}', Punctuation, ('#pop', '#pop')),
],
# a json object - { attr, attr, ... }
'objectvalue': [
include('whitespace'),
(r'"(\\\\|\\"|[^"])*"', Name.Tag, 'objectattribute'),
- (r'}', Punctuation, '#pop'),
+ (r'\}', Punctuation, '#pop'),
],
# json array - [ value, value, ... }
@@ -491,14 +491,14 @@ class JsonLexer(RegexLexer):
include('whitespace'),
include('value'),
(r',', Punctuation),
- (r']', Punctuation, '#pop'),
+ (r'\]', Punctuation, '#pop'),
],
# a json value - either a simple value or a complex value (object or array)
'value': [
include('whitespace'),
include('simplevalue'),
- (r'{', Punctuation, 'objectvalue'),
+ (r'\{', Punctuation, 'objectvalue'),
(r'\[', Punctuation, 'arrayvalue'),
],