From 4689cf62489ad3a537451ac2cedaa39b505d7608 Mon Sep 17 00:00:00 2001 From: Lucas Trzesniewski Date: Sun, 17 Dec 2023 22:14:50 +0100 Subject: [PATCH] Fix JSON highlighting --- .../Highlighting/Resources/Json.xshd | 40 ++++++++++++------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/ICSharpCode.AvalonEdit/Highlighting/Resources/Json.xshd b/ICSharpCode.AvalonEdit/Highlighting/Resources/Json.xshd index e6fe08f0..561ee39e 100644 --- a/ICSharpCode.AvalonEdit/Highlighting/Resources/Json.xshd +++ b/ICSharpCode.AvalonEdit/Highlighting/Resources/Json.xshd @@ -10,7 +10,7 @@ - + @@ -22,27 +22,28 @@ ' ' - + : + (?= [,}] ) - - , - + + , + - - - , - + + + , + - + true false - + null @@ -62,11 +63,22 @@ \] - \b0[xX][0-9a-fA-F]+|(\b\d+(\.[0-9]+)?|\.[0-9]+)([eE][+-]?[0-9]+)? + -? \b + (?: + 0[xX][0-9a-fA-F]+ + | + (?: + + [0-9]+ (?: \. [0-9]+ )? + | + \. [0-9]+ + ) + (?: [eE] [+-]? [0-9]+ )? + ) - + - \ No newline at end of file +