From 833ea942f592124492928aafe0aad65db31e686a Mon Sep 17 00:00:00 2001 From: nuintun Date: Tue, 19 Nov 2024 15:12:30 +0800 Subject: [PATCH] feat: Update examples --- packages/examples/src/js/utils/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/examples/src/js/utils/utils.ts b/packages/examples/src/js/utils/utils.ts index 0da3e923..7a4e1354 100644 --- a/packages/examples/src/js/utils/utils.ts +++ b/packages/examples/src/js/utils/utils.ts @@ -57,7 +57,7 @@ export function syntaxHighlight( boolean: booleanClassName = 'boolean' }: ClassNamesHighlight = {} ): string { - const PARSE_RE = /("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g; + const PARSE_RE = /"(?:\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(?:\s*:)?|\b(?:true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g; return json .replace(/[&<>]/gm, match => {