diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml index fd29063..b2b392d 100644 --- a/.github/workflows/node.yml +++ b/.github/workflows/node.yml @@ -34,6 +34,7 @@ jobs: - name: install dependencies (ubuntu only) if: matrix.os == 'ubuntu-latest' run: | + echo "deb http://gb.archive.ubuntu.com/ubuntu jammy main" | sudo tee -a /etc/apt/sources.list sudo apt-get update sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf - name: install frontend dependencies diff --git a/src/common/monaco/lexerRules.ts b/src/common/monaco/lexerRules.ts index c38f324..13e2887 100644 --- a/src/common/monaco/lexerRules.ts +++ b/src/common/monaco/lexerRules.ts @@ -57,20 +57,21 @@ export const search = { { include: '@json5' }, ], json5: [ - [ - /["']?(.*_?script|inline|source)["']?(\s*?)(:)(\s*?)("""|''')/, - [ - 'variable', - 'whitespace', - 'delimiter', - 'whitespace', - { - token: 'punctuation.start_triple_quote', - nextEmbedded: 'painless', - next: 'search_painless', - }, - ], - ], + // @TODO add painless highlighting & tokenization support + // [ + // /["']?(.*_?script|inline|source)["']?(\s*?)(:)(\s*?)("""|''')/, + // [ + // 'variable', + // 'whitespace', + // 'delimiter', + // 'whitespace', + // { + // token: 'punctuation.start_triple_quote', + // nextEmbedded: 'painless', + // next: 'search_painless', + // }, + // ], + // ], [ /(:)(\s*?)("""|''')(sql)/, [ diff --git a/src/common/monaco/tokenlizer.ts b/src/common/monaco/tokenlizer.ts index f70a4f2..60de55c 100644 --- a/src/common/monaco/tokenlizer.ts +++ b/src/common/monaco/tokenlizer.ts @@ -127,6 +127,11 @@ export const formatQDSL = ( return lines.map(line => JSON5.stringify(line)).join('\n'); }; +const replaceTripleQuotes = (value: string) => + value + .replace(/'''(.*?)'''/gs, (_, match) => JSON.stringify(match)) + .replace(/"""(.*?)"""/gs, (_, match) => JSON.stringify(match)); + export const transformQDSL = ({ path, qdsl }: Pick) => { try { const bulkAction = path.includes('_bulk'); @@ -138,7 +143,7 @@ export const transformQDSL = ({ path, qdsl }: Pick