Skip to content

Commit

Permalink
feat: Update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
nuintun committed Nov 19, 2024
1 parent 771f6e8 commit 833ea94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/examples/src/js/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down

0 comments on commit 833ea94

Please sign in to comment.