From 851bff3d09bc338385c8fc4dc87dcd2f4a3accf3 Mon Sep 17 00:00:00 2001 From: goodroot <9484709+goodroot@users.noreply.github.com> Date: Mon, 2 Dec 2024 10:05:39 -0800 Subject: [PATCH 1/3] create variable syntax --- src/internals/prism-dracula.js | 7 +++++++ src/theme/prism-include-languages.js | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/internals/prism-dracula.js b/src/internals/prism-dracula.js index ffd7c76d..8bd417fe 100644 --- a/src/internals/prism-dracula.js +++ b/src/internals/prism-dracula.js @@ -85,6 +85,13 @@ const theme = { color: "rgb(241, 250, 140)", }, }, + { + types: ["variable"], + style: { + color: color.draculaPurple, + fontStyle: "italic", + }, + }, ], } diff --git a/src/theme/prism-include-languages.js b/src/theme/prism-include-languages.js index f46c8b98..73c66626 100644 --- a/src/theme/prism-include-languages.js +++ b/src/theme/prism-include-languages.js @@ -19,10 +19,10 @@ const prismIncludeLanguages = (PrismObject) => { dataType: new RegExp(`\\b(?:${dataTypes.join("|")})\\b`, "i"), variable: [ { - pattern: /@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/, + pattern: /@[\w.$]+/, greedy: true, }, - /@[\w.$]+/, + /@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/, ], string: { pattern: /(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/, From cbaa675a0bbfb3961a22fe010dc71cd9b40f33a9 Mon Sep 17 00:00:00 2001 From: goodroot <9484709+goodroot@users.noreply.github.com> Date: Mon, 2 Dec 2024 10:05:45 -0800 Subject: [PATCH 2/3] bump packages for DECLARE --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9017a7b4..0ce783ff 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "@headlessui/react": "^2.2.0", "@heroicons/react": "2.2.0", "@mdx-js/react": "3.1.0", - "@questdb/sql-grammar": "1.1.0", + "@questdb/sql-grammar": "1.2.0", "@radix-ui/react-dialog": "1.1.2", "@radix-ui/react-hover-card": "1.1.2", "@radix-ui/react-slider": "1.2.1", From 2a242fb162a24e119c21648e6314d617f8828baa Mon Sep 17 00:00:00 2001 From: goodroot <9484709+goodroot@users.noreply.github.com> Date: Mon, 2 Dec 2024 10:07:58 -0800 Subject: [PATCH 3/3] yarn.lock --- yarn.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yarn.lock b/yarn.lock index bc37adcc..671357c5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2477,10 +2477,10 @@ resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.28.tgz#d45e01c4a56f143ee69c54dd6b12eade9e270a73" integrity sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw== -"@questdb/sql-grammar@1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@questdb/sql-grammar/-/sql-grammar-1.1.0.tgz#75b46a86c21fe792cce8bd28950f5871085d3bdb" - integrity sha512-O4tD5PAMC/aV0qzNJ2QbDo6gWO71DqzEnp+EgxYei5PM01x3lAUm7+JhyMlQixoIHvo1i641F8GIjO0ErRTXfw== +"@questdb/sql-grammar@1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@questdb/sql-grammar/-/sql-grammar-1.2.0.tgz#d53324266bf08d76e12d0c4522af89330f8a716e" + integrity sha512-N6/xfe36Lex0os2/MknH+N/sjwc05AsQIZWZ+8Btj6EFvaEgJMZVptpA2dLNG/vu+i3yJ3Q7D+DsFNdfAM2o3A== "@radix-ui/number@1.1.0": version "1.1.0"