Skip to content

Commit 79eba36

Browse files
committed
Update the bigquery extractor to use foreign_capture_group
1 parent 02c0da5 commit 79eba36

File tree

1 file changed

+2
-2
lines changed
  • packages/jupyterlab-lsp/src/transclusions/ipython-bigquery

1 file changed

+2
-2
lines changed

packages/jupyterlab-lsp/src/transclusions/ipython-bigquery/extractors.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ export let foreign_code_extractors: IForeignCodeExtractorsRegistry = {
2626
python: [
2727
new RegExpForeignCodeExtractor({
2828
language: 'sql',
29-
pattern: `^%%bigquery(?: (?:${SQL_URL_PATTERN}|${COMMAND_PATTERN}|(?:\\w+ << )|(?:\\w+@\\w+)))?\n?(.+\n)?([^]*)`,
30-
extract_to_foreign: '$1$2',
29+
pattern: `^%%bigquery(?: (?:${SQL_URL_PATTERN}|${COMMAND_PATTERN}|(?:\\w+ << )|(?:\\w+@\\w+)))?\n?((?:.+\n)?(?:[^]*))`,
30+
foreign_capture_group: 1,
3131
is_standalone: true,
3232
file_extension: 'sql'
3333
})

0 commit comments

Comments
 (0)