From c40813e932c1589f37ee6d63e2d495679c4bedb0 Mon Sep 17 00:00:00 2001 From: FredKSchott Date: Mon, 28 Mar 2022 12:02:06 +0000 Subject: [PATCH 1/9] [ci] collect stats --- scripts/stats/stats.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/stats/stats.csv b/scripts/stats/stats.csv index 8437b826b5fa..1ff8ca3270f9 100644 --- a/scripts/stats/stats.csv +++ b/scripts/stats/stats.csv @@ -1,4 +1,5 @@ Date,Commits (24hr),Issues (24hr),Issues:BUG (24hr),Issues:RFC (24hr),Issues:DOC (24hr),PRs (24hr),Open PRs,Open Issues,Bugs: Needs Triage,Bugs: Accepted,RFC: In Progress,RFC: Accepted,Date (ISO) +"Monday, March 28, 2022",1,7,7,0,0,2,8,83,36,41,0,0,"2022-03-28T12:02:00.954Z" "Sunday, March 27, 2022",1,2,2,0,0,2,6,77,29,41,0,0,"2022-03-27T12:01:52.463Z" "Saturday, March 26, 2022",22,5,5,0,0,12,5,75,27,41,0,0,"2022-03-26T12:03:34.243Z" "Friday, March 25, 2022",18,2,2,0,0,7,6,73,25,40,0,0,"2022-03-25T12:02:05.476Z" From 77354c89bd606beba71231cce6ce935905de68a7 Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Mon, 28 Mar 2022 16:48:06 -0400 Subject: [PATCH 2/9] Prevent CSS from being added to pages not using it (#2918) * Prevent CSS from being added to pages not using it * Adds a changeset * Add clarification when the CSS is appended to the pageData * Move addStyles up a level --- .changeset/tiny-snails-grab.md | 5 ++ packages/astro/src/core/build/internal.ts | 4 ++ .../astro/src/core/build/scan-based-build.ts | 1 + packages/astro/src/core/build/static-build.ts | 3 +- .../astro/src/core/build/vite-plugin-pages.ts | 2 +- .../astro/src/vite-plugin-build-css/index.ts | 70 +++++++++++++++++-- .../page-level-styles/src/layouts/Base.astro | 13 ++++ .../src/layouts/Styled.astro | 13 ++++ .../page-level-styles/src/pages/blog.astro | 9 +++ .../page-level-styles/src/pages/index.astro | 9 +++ .../page-level-styles/src/styles/main.css | 4 ++ packages/astro/test/page-level-styles.test.js | 27 +++++++ 12 files changed, 153 insertions(+), 7 deletions(-) create mode 100644 .changeset/tiny-snails-grab.md create mode 100644 packages/astro/test/fixtures/page-level-styles/src/layouts/Base.astro create mode 100644 packages/astro/test/fixtures/page-level-styles/src/layouts/Styled.astro create mode 100644 packages/astro/test/fixtures/page-level-styles/src/pages/blog.astro create mode 100644 packages/astro/test/fixtures/page-level-styles/src/pages/index.astro create mode 100644 packages/astro/test/fixtures/page-level-styles/src/styles/main.css create mode 100644 packages/astro/test/page-level-styles.test.js diff --git a/.changeset/tiny-snails-grab.md b/.changeset/tiny-snails-grab.md new file mode 100644 index 000000000000..2f7d50651b8f --- /dev/null +++ b/.changeset/tiny-snails-grab.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Prevent CSS from being added to the wrong pages diff --git a/packages/astro/src/core/build/internal.ts b/packages/astro/src/core/build/internal.ts index c436b9c5caae..674a657b6d3a 100644 --- a/packages/astro/src/core/build/internal.ts +++ b/packages/astro/src/core/build/internal.ts @@ -105,6 +105,10 @@ export function getPageDataByViteID(internals: BuildInternals, viteid: ViteID): return undefined; } +export function hasPageDataByViteID(internals: BuildInternals, viteid: ViteID): boolean { + return internals.pagesByViteID.has(viteid); +} + export function* eachPageData(internals: BuildInternals) { yield* internals.pagesByComponent.values(); } diff --git a/packages/astro/src/core/build/scan-based-build.ts b/packages/astro/src/core/build/scan-based-build.ts index 1a4cf16e4284..ec473ca79348 100644 --- a/packages/astro/src/core/build/scan-based-build.ts +++ b/packages/astro/src/core/build/scan-based-build.ts @@ -76,6 +76,7 @@ export async function build(opts: ScanBasedBuildOptions): Promise(); + function * walkStyles(ctx: PluginContext, id: string, seen = new Set()): Generator<[string, string], void, unknown> { + seen.add(id); + if(styleSourceMap.has(id)) { + yield [id, styleSourceMap.get(id)!]; + } + + const info = ctx.getModuleInfo(id); + if(info) { + for(const importedId of info.importedIds) { + if(!seen.has(importedId)) { + yield * walkStyles(ctx, importedId, seen); + } + } + } + } + + /** + * This walks the dependency graph looking for styles that are imported + * by a page and then creates a chunking containing all of the styles for that page. + * Since there is only 1 entrypoint for the entire app, we do this in order + * to prevent adding all styles to all pages. + */ + async function addStyles(this: PluginContext) { + for(const id of this.getModuleIds()) { + if(hasPageDataByViteID(internals, id)) { + let pageStyles = ''; + for(const [_styleId, styles] of walkStyles(this, id)) { + pageStyles += styles; + } + + // Pages with no styles, nothing more to do + if(!pageStyles) continue; + + const { code: minifiedCSS } = await esbuild.transform(pageStyles, { + loader: 'css', + minify: true, + }); + const referenceId = this.emitFile({ + name: 'entry' + '.css', + type: 'asset', + source: minifiedCSS, + }); + const fileName = this.getFileName(referenceId); + + // Add CSS file to the page's pageData, so that it will be rendered with + // the correct links. + getPageDataByViteID(internals, id)?.css.add(fileName); + } + } + } + return { name: PLUGIN_NAME, @@ -76,7 +130,6 @@ export function rollupPluginAstroBuildCSS(options: PluginOptions): VitePlugin { plugins.splice(viteCSSPostIndex - 1, 0, ourPlugin); } }, - async resolveId(id) { if (isPageStyleVirtualModule(id)) { return id; @@ -108,6 +161,8 @@ export function rollupPluginAstroBuildCSS(options: PluginOptions): VitePlugin { }, async renderChunk(_code, chunk) { + if(!legacy) return null; + let chunkCSS = ''; let isPureCSS = true; for (const [id] of Object.entries(chunk.modules)) { @@ -147,7 +202,7 @@ export function rollupPluginAstroBuildCSS(options: PluginOptions): VitePlugin { }, // Delete CSS chunks so JS is not produced for them. - generateBundle(opts, bundle) { + async generateBundle(opts, bundle) { const hasPureCSSChunks = internals.pureCSSChunks.size; const pureChunkFilenames = new Set([...internals.pureCSSChunks].map((chunk) => chunk.fileName)); const emptyChunkFiles = [...pureChunkFilenames] @@ -156,6 +211,11 @@ export function rollupPluginAstroBuildCSS(options: PluginOptions): VitePlugin { .replace(/\./g, '\\.'); const emptyChunkRE = new RegExp(opts.format === 'es' ? `\\bimport\\s*"[^"]*(?:${emptyChunkFiles})";\n?` : `\\brequire\\(\\s*"[^"]*(?:${emptyChunkFiles})"\\);\n?`, 'g'); + // Crawl the module graph to find CSS chunks to create + if(!legacy) { + await addStyles.call(this); + } + for (const [chunkId, chunk] of Object.entries(bundle)) { if (chunk.type === 'chunk') { // This find shared chunks of CSS and adds them to the main CSS chunks, diff --git a/packages/astro/test/fixtures/page-level-styles/src/layouts/Base.astro b/packages/astro/test/fixtures/page-level-styles/src/layouts/Base.astro new file mode 100644 index 000000000000..f900a1e88bbb --- /dev/null +++ b/packages/astro/test/fixtures/page-level-styles/src/layouts/Base.astro @@ -0,0 +1,13 @@ +--- + +--- + + + + + Astro + + + + + diff --git a/packages/astro/test/fixtures/page-level-styles/src/layouts/Styled.astro b/packages/astro/test/fixtures/page-level-styles/src/layouts/Styled.astro new file mode 100644 index 000000000000..e32ade457194 --- /dev/null +++ b/packages/astro/test/fixtures/page-level-styles/src/layouts/Styled.astro @@ -0,0 +1,13 @@ +--- +import "../styles/main.css"; +--- + + + + + Astro + + + + + diff --git a/packages/astro/test/fixtures/page-level-styles/src/pages/blog.astro b/packages/astro/test/fixtures/page-level-styles/src/pages/blog.astro new file mode 100644 index 000000000000..de9f896a9fda --- /dev/null +++ b/packages/astro/test/fixtures/page-level-styles/src/pages/blog.astro @@ -0,0 +1,9 @@ +--- +import Layout from '../layouts/Styled.astro' +--- + + +

Astro (with main.css)

+

This should have custom styles (white text on black background)

+ Home (without main.css) +
diff --git a/packages/astro/test/fixtures/page-level-styles/src/pages/index.astro b/packages/astro/test/fixtures/page-level-styles/src/pages/index.astro new file mode 100644 index 000000000000..d4ae3567606f --- /dev/null +++ b/packages/astro/test/fixtures/page-level-styles/src/pages/index.astro @@ -0,0 +1,9 @@ +--- +import Layout from '../layouts/Base.astro' +--- + + +

Astro (without main.css)

+

This should have default styles (white text on black background)

+ Blog (with main.css) +
diff --git a/packages/astro/test/fixtures/page-level-styles/src/styles/main.css b/packages/astro/test/fixtures/page-level-styles/src/styles/main.css new file mode 100644 index 000000000000..1bee9c0281bd --- /dev/null +++ b/packages/astro/test/fixtures/page-level-styles/src/styles/main.css @@ -0,0 +1,4 @@ +body { + background-color: black; + color: white; +} diff --git a/packages/astro/test/page-level-styles.test.js b/packages/astro/test/page-level-styles.test.js new file mode 100644 index 000000000000..ae06c6697411 --- /dev/null +++ b/packages/astro/test/page-level-styles.test.js @@ -0,0 +1,27 @@ +import { expect } from 'chai'; +import { load as cheerioLoad } from 'cheerio'; +import { loadFixture } from './test-utils.js'; + +// Asset bundling +describe('Page-level styles', () => { + let fixture; + + before(async () => { + fixture = await loadFixture({ + projectRoot: './fixtures/page-level-styles/', + }); + await fixture.build(); + }); + + it('Doesn\'t add page styles for a page without style imports', async () => { + let html = await fixture.readFile('/index.html'); + let $ = await cheerioLoad(html); + expect($('link').length).to.equal(0); + }); + + it('Does add page styles for pages with style imports (or deps)', async () => { + let html = await fixture.readFile('/blog/index.html'); + let $ = await cheerioLoad(html); + expect($('link').length).to.equal(1); + }); +}); From 5c9312620d00827ca783bc319e3f5376dd6cecd2 Mon Sep 17 00:00:00 2001 From: matthewp Date: Mon, 28 Mar 2022 20:49:06 +0000 Subject: [PATCH 3/9] [ci] format --- .../astro/src/core/build/scan-based-build.ts | 2 +- packages/astro/src/core/build/static-build.ts | 4 ++-- .../astro/src/vite-plugin-build-css/index.ts | 24 +++++++++---------- packages/astro/test/page-level-styles.test.js | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/packages/astro/src/core/build/scan-based-build.ts b/packages/astro/src/core/build/scan-based-build.ts index ec473ca79348..afb2a5393a63 100644 --- a/packages/astro/src/core/build/scan-based-build.ts +++ b/packages/astro/src/core/build/scan-based-build.ts @@ -76,7 +76,7 @@ export async function build(opts: ScanBasedBuildOptions): Promise(); - function * walkStyles(ctx: PluginContext, id: string, seen = new Set()): Generator<[string, string], void, unknown> { + function* walkStyles(ctx: PluginContext, id: string, seen = new Set()): Generator<[string, string], void, unknown> { seen.add(id); - if(styleSourceMap.has(id)) { + if (styleSourceMap.has(id)) { yield [id, styleSourceMap.get(id)!]; } const info = ctx.getModuleInfo(id); - if(info) { - for(const importedId of info.importedIds) { - if(!seen.has(importedId)) { - yield * walkStyles(ctx, importedId, seen); + if (info) { + for (const importedId of info.importedIds) { + if (!seen.has(importedId)) { + yield* walkStyles(ctx, importedId, seen); } } } @@ -76,15 +76,15 @@ export function rollupPluginAstroBuildCSS(options: PluginOptions): VitePlugin { * to prevent adding all styles to all pages. */ async function addStyles(this: PluginContext) { - for(const id of this.getModuleIds()) { - if(hasPageDataByViteID(internals, id)) { + for (const id of this.getModuleIds()) { + if (hasPageDataByViteID(internals, id)) { let pageStyles = ''; - for(const [_styleId, styles] of walkStyles(this, id)) { + for (const [_styleId, styles] of walkStyles(this, id)) { pageStyles += styles; } // Pages with no styles, nothing more to do - if(!pageStyles) continue; + if (!pageStyles) continue; const { code: minifiedCSS } = await esbuild.transform(pageStyles, { loader: 'css', @@ -161,7 +161,7 @@ export function rollupPluginAstroBuildCSS(options: PluginOptions): VitePlugin { }, async renderChunk(_code, chunk) { - if(!legacy) return null; + if (!legacy) return null; let chunkCSS = ''; let isPureCSS = true; @@ -212,7 +212,7 @@ export function rollupPluginAstroBuildCSS(options: PluginOptions): VitePlugin { const emptyChunkRE = new RegExp(opts.format === 'es' ? `\\bimport\\s*"[^"]*(?:${emptyChunkFiles})";\n?` : `\\brequire\\(\\s*"[^"]*(?:${emptyChunkFiles})"\\);\n?`, 'g'); // Crawl the module graph to find CSS chunks to create - if(!legacy) { + if (!legacy) { await addStyles.call(this); } diff --git a/packages/astro/test/page-level-styles.test.js b/packages/astro/test/page-level-styles.test.js index ae06c6697411..6b3fb5dac4ca 100644 --- a/packages/astro/test/page-level-styles.test.js +++ b/packages/astro/test/page-level-styles.test.js @@ -13,7 +13,7 @@ describe('Page-level styles', () => { await fixture.build(); }); - it('Doesn\'t add page styles for a page without style imports', async () => { + it("Doesn't add page styles for a page without style imports", async () => { let html = await fixture.readFile('/index.html'); let $ = await cheerioLoad(html); expect($('link').length).to.equal(0); From 8b7220f5e47782bcb1713479fd829a1dfc9fff6d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 28 Mar 2022 16:52:23 -0400 Subject: [PATCH 4/9] [ci] release (#2919) Co-authored-by: github-actions[bot] --- .changeset/tiny-snails-grab.md | 5 -- examples/blog-multiple-authors/package.json | 2 +- examples/blog/package.json | 2 +- examples/component/demo/package.json | 2 +- examples/component/package.json | 2 +- examples/docs/package.json | 2 +- examples/env-vars/package.json | 2 +- examples/framework-alpine/package.json | 2 +- examples/framework-lit/package.json | 2 +- examples/framework-multiple/package.json | 2 +- examples/framework-preact/package.json | 2 +- examples/framework-react/package.json | 2 +- examples/framework-solid/package.json | 2 +- examples/framework-svelte/package.json | 2 +- examples/framework-vue/package.json | 2 +- examples/integrations-playground/package.json | 2 +- examples/minimal/package.json | 2 +- examples/non-html-pages/package.json | 2 +- examples/portfolio/package.json | 2 +- examples/ssr/package.json | 2 +- examples/starter/package.json | 2 +- examples/subpath/package.json | 2 +- examples/with-markdown-plugins/package.json | 2 +- examples/with-markdown-shiki/package.json | 2 +- examples/with-markdown/package.json | 2 +- examples/with-nanostores/package.json | 2 +- examples/with-tailwindcss/package.json | 2 +- examples/with-vite-plugin-pwa/package.json | 2 +- packages/astro/CHANGELOG.md | 70 ++++++++++--------- packages/astro/package.json | 2 +- pnpm-lock.yaml | 54 +++++++------- 31 files changed, 93 insertions(+), 92 deletions(-) delete mode 100644 .changeset/tiny-snails-grab.md diff --git a/.changeset/tiny-snails-grab.md b/.changeset/tiny-snails-grab.md deleted file mode 100644 index 2f7d50651b8f..000000000000 --- a/.changeset/tiny-snails-grab.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Prevent CSS from being added to the wrong pages diff --git a/examples/blog-multiple-authors/package.json b/examples/blog-multiple-authors/package.json index a4fe9ae2a383..26a149981bc2 100644 --- a/examples/blog-multiple-authors/package.json +++ b/examples/blog-multiple-authors/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/preact": "^0.0.2", - "astro": "^0.25.2", + "astro": "^0.25.3", "sass": "^1.49.9" }, "dependencies": { diff --git a/examples/blog/package.json b/examples/blog/package.json index 6ec109958933..2aa6de6fbd58 100644 --- a/examples/blog/package.json +++ b/examples/blog/package.json @@ -9,7 +9,7 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^0.25.2", + "astro": "^0.25.3", "@astrojs/preact": "^0.0.2" }, "dependencies": { diff --git a/examples/component/demo/package.json b/examples/component/demo/package.json index fbac5dabc197..a327d59cfcba 100644 --- a/examples/component/demo/package.json +++ b/examples/component/demo/package.json @@ -10,6 +10,6 @@ }, "devDependencies": { "@example/my-component": "workspace:*", - "astro": "^0.25.2" + "astro": "^0.25.3" } } diff --git a/examples/component/package.json b/examples/component/package.json index d1e04611721a..665cd0667fc9 100644 --- a/examples/component/package.json +++ b/examples/component/package.json @@ -8,6 +8,6 @@ "serve": "astro --project-root demo preview" }, "devDependencies": { - "astro": "^0.25.2" + "astro": "^0.25.3" } } diff --git a/examples/docs/package.json b/examples/docs/package.json index b3d46d8b48f0..3529de1c787f 100644 --- a/examples/docs/package.json +++ b/examples/docs/package.json @@ -20,6 +20,6 @@ "devDependencies": { "@astrojs/preact": "^0.0.2", "@astrojs/react": "^0.0.2", - "astro": "^0.25.2" + "astro": "^0.25.3" } } diff --git a/examples/env-vars/package.json b/examples/env-vars/package.json index 98c46b1fa6c5..1d934f60ed9e 100644 --- a/examples/env-vars/package.json +++ b/examples/env-vars/package.json @@ -9,6 +9,6 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^0.25.2" + "astro": "^0.25.3" } } diff --git a/examples/framework-alpine/package.json b/examples/framework-alpine/package.json index df93e5aaa02b..89ce3a5d98f5 100644 --- a/examples/framework-alpine/package.json +++ b/examples/framework-alpine/package.json @@ -9,6 +9,6 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^0.25.2" + "astro": "^0.25.3" } } diff --git a/examples/framework-lit/package.json b/examples/framework-lit/package.json index 0ddf30351bde..d2c789019aca 100644 --- a/examples/framework-lit/package.json +++ b/examples/framework-lit/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/lit": "^0.0.2", - "astro": "^0.25.2" + "astro": "^0.25.3" }, "dependencies": { "@webcomponents/template-shadowroot": "^0.1.0", diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json index 56aee2241d3b..cf7162a5ef00 100644 --- a/examples/framework-multiple/package.json +++ b/examples/framework-multiple/package.json @@ -15,7 +15,7 @@ "@astrojs/solid-js": "^0.0.3", "@astrojs/svelte": "^0.0.2", "@astrojs/vue": "^0.0.2", - "astro": "^0.25.2" + "astro": "^0.25.3" }, "dependencies": { "@webcomponents/template-shadowroot": "^0.1.0", diff --git a/examples/framework-preact/package.json b/examples/framework-preact/package.json index 9ef56e4f2b82..1f10b5bc2bde 100644 --- a/examples/framework-preact/package.json +++ b/examples/framework-preact/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/preact": "^0.0.2", - "astro": "^0.25.2" + "astro": "^0.25.3" }, "dependencies": { "preact": "^10.6.6" diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json index 6670cefdac1c..030c7fc88ab2 100644 --- a/examples/framework-react/package.json +++ b/examples/framework-react/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/react": "^0.0.2", - "astro": "^0.25.2" + "astro": "^0.25.3" }, "dependencies": { "react": "^17.0.2", diff --git a/examples/framework-solid/package.json b/examples/framework-solid/package.json index a23efdc99353..a75ca71b1107 100644 --- a/examples/framework-solid/package.json +++ b/examples/framework-solid/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/solid-js": "^0.0.3", - "astro": "^0.25.2" + "astro": "^0.25.3" }, "dependencies": { "solid-js": "^1.3.13" diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json index 7b87d3dc69da..9420993099fc 100644 --- a/examples/framework-svelte/package.json +++ b/examples/framework-svelte/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/svelte": "^0.0.2", - "astro": "^0.25.2" + "astro": "^0.25.3" }, "dependencies": { "svelte": "^3.46.4" diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json index fefbf95a8fc9..ecd829b5e939 100644 --- a/examples/framework-vue/package.json +++ b/examples/framework-vue/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/vue": "^0.0.2", - "astro": "^0.25.2" + "astro": "^0.25.3" }, "dependencies": { "vue": "^3.2.31" diff --git a/examples/integrations-playground/package.json b/examples/integrations-playground/package.json index e1bfe0a32d24..ada918853836 100644 --- a/examples/integrations-playground/package.json +++ b/examples/integrations-playground/package.json @@ -15,7 +15,7 @@ "@astrojs/sitemap": "^0.0.2", "@astrojs/tailwind": "^0.0.2", "@astrojs/turbolinks": "^0.0.2", - "astro": "^0.25.2" + "astro": "^0.25.3" }, "dependencies": { "@webcomponents/template-shadowroot": "^0.1.0", diff --git a/examples/minimal/package.json b/examples/minimal/package.json index 434f6c7a8818..cecbf5c5f4f4 100644 --- a/examples/minimal/package.json +++ b/examples/minimal/package.json @@ -9,6 +9,6 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^0.25.2" + "astro": "^0.25.3" } } diff --git a/examples/non-html-pages/package.json b/examples/non-html-pages/package.json index 5e68a70a99c3..6cbfb1568142 100644 --- a/examples/non-html-pages/package.json +++ b/examples/non-html-pages/package.json @@ -9,6 +9,6 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^0.25.2" + "astro": "^0.25.3" } } diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json index f666b225afa1..35bdca86608a 100644 --- a/examples/portfolio/package.json +++ b/examples/portfolio/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/preact": "^0.0.2", - "astro": "^0.25.2", + "astro": "^0.25.3", "sass": "^1.49.9" }, "dependencies": { diff --git a/examples/ssr/package.json b/examples/ssr/package.json index 283bcf296576..884a18a54ea6 100644 --- a/examples/ssr/package.json +++ b/examples/ssr/package.json @@ -13,7 +13,7 @@ "devDependencies": { "@astrojs/svelte": "^0.0.2", "@astrojs/node": "^0.0.2", - "astro": "^0.25.2", + "astro": "^0.25.3", "concurrently": "^7.0.0", "lightcookie": "^1.0.25", "unocss": "^0.15.6", diff --git a/examples/starter/package.json b/examples/starter/package.json index ff451d99d14b..0fff1a509743 100644 --- a/examples/starter/package.json +++ b/examples/starter/package.json @@ -9,6 +9,6 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^0.25.2" + "astro": "^0.25.3" } } diff --git a/examples/subpath/package.json b/examples/subpath/package.json index 5135d73b7dd7..cc4c33c3cfec 100644 --- a/examples/subpath/package.json +++ b/examples/subpath/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/react": "^0.0.2", - "astro": "^0.25.2", + "astro": "^0.25.3", "sass": "^1.49.9" }, "dependencies": { diff --git a/examples/with-markdown-plugins/package.json b/examples/with-markdown-plugins/package.json index 78bb78e2e281..52495596aa1e 100644 --- a/examples/with-markdown-plugins/package.json +++ b/examples/with-markdown-plugins/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/markdown-remark": "^0.7.0", - "astro": "^0.25.2", + "astro": "^0.25.3", "hast-util-select": "5.0.1", "rehype-autolink-headings": "^6.1.1", "rehype-slug": "^5.0.1", diff --git a/examples/with-markdown-shiki/package.json b/examples/with-markdown-shiki/package.json index bd7b55130304..c1feb2baad1e 100644 --- a/examples/with-markdown-shiki/package.json +++ b/examples/with-markdown-shiki/package.json @@ -10,6 +10,6 @@ }, "devDependencies": { "@astrojs/markdown-remark": "^0.7.0", - "astro": "^0.25.2" + "astro": "^0.25.3" } } diff --git a/examples/with-markdown/package.json b/examples/with-markdown/package.json index 990cc34f8dd2..3f2e894a334e 100644 --- a/examples/with-markdown/package.json +++ b/examples/with-markdown/package.json @@ -14,7 +14,7 @@ "@astrojs/react": "^0.0.2", "@astrojs/svelte": "^0.0.2", "@astrojs/vue": "^0.0.2", - "astro": "^0.25.2" + "astro": "^0.25.3" }, "dependencies": { "preact": "^10.6.6", diff --git a/examples/with-nanostores/package.json b/examples/with-nanostores/package.json index 291bd5a730c2..5bfc50268d22 100644 --- a/examples/with-nanostores/package.json +++ b/examples/with-nanostores/package.json @@ -25,6 +25,6 @@ "@astrojs/solid-js": "^0.0.3", "@astrojs/svelte": "^0.0.2", "@astrojs/vue": "^0.0.2", - "astro": "^0.25.2" + "astro": "^0.25.3" } } diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index 071703164084..8b48d6084379 100644 --- a/examples/with-tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/tailwind": "^0.0.2", - "astro": "^0.25.2", + "astro": "^0.25.3", "autoprefixer": "^10.4.4", "canvas-confetti": "^1.5.1", "postcss": "^8.4.12", diff --git a/examples/with-vite-plugin-pwa/package.json b/examples/with-vite-plugin-pwa/package.json index 8fd4c2cf597f..47051bf98a85 100644 --- a/examples/with-vite-plugin-pwa/package.json +++ b/examples/with-vite-plugin-pwa/package.json @@ -9,7 +9,7 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^0.25.2", + "astro": "^0.25.3", "vite-plugin-pwa": "0.11.11", "workbox-window": "^6.5.2" } diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index 8acbd6eef3f2..64d945c285fd 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1,5 +1,11 @@ # astro +## 0.25.3 + +### Patch Changes + +- [#2918](https://github.com/withastro/astro/pull/2918) [`77354c89`](https://github.com/withastro/astro/commit/77354c89bd606beba71231cce6ce935905de68a7) Thanks [@matthewp](https://github.com/matthewp)! - Prevent CSS from being added to the wrong pages + ## 0.25.2 ### Patch Changes @@ -41,7 +47,7 @@ import netlify from '@astrojs/netlify/functions'; export default defineConfig({ - adapter: netlify(), + adapter: netlify(), }); ``` @@ -61,7 +67,7 @@ import nodejs from '@astrojs/node'; export default { - adapter: nodejs(), + adapter: nodejs(), }; ``` @@ -121,7 +127,7 @@ import nodejs from '@astrojs/node'; export default { - adapter: nodejs(), + adapter: nodejs(), }; ``` @@ -217,7 +223,7 @@ import { defineConfig } from 'astro/config'; export default defineConfig({ - renderers: [], + renderers: [], }); ``` @@ -255,9 +261,9 @@ ```json { - "scripts": { - "build": "astro build --legacy-build" - } + "scripts": { + "build": "astro build --legacy-build" + } } ``` @@ -277,7 +283,7 @@ ```ts if (Astro.slots.has('default')) { - const content = await Astro.slots.render('default'); + const content = await Astro.slots.render('default'); } ``` @@ -361,7 +367,7 @@ ```ts if (Astro.slots.has('default')) { - const content = await Astro.slots.render('default'); + const content = await Astro.slots.render('default'); } ``` @@ -385,9 +391,9 @@ ```json { - "scripts": { - "build": "astro build --legacy-build" - } + "scripts": { + "build": "astro build --legacy-build" + } } ``` @@ -499,12 +505,12 @@ ```typescript // src/pages/company.json.ts export async function get() { - return { - body: JSON.stringify({ - name: 'Astro Technology Company', - url: 'https://astro.build/', - }), - }; + return { + body: JSON.stringify({ + name: 'Astro Technology Company', + url: 'https://astro.build/', + }), + }; } ``` @@ -666,12 +672,12 @@ ```typescript // src/pages/company.json.ts export async function get() { - return { - body: JSON.stringify({ - name: 'Astro Technology Company', - url: 'https://astro.build/', - }), - }; + return { + body: JSON.stringify({ + name: 'Astro Technology Company', + url: 'https://astro.build/', + }), + }; } ``` @@ -2026,10 +2032,10 @@ For convenience, you may now also move your `astro.config.js` file to a top-leve ```js export default { - markdownOptions: { - remarkPlugins: ['remark-slug', ['remark-autolink-headings', { behavior: 'prepend' }]], - rehypePlugins: ['rehype-slug', ['rehype-autolink-headings', { behavior: 'prepend' }]], - }, + markdownOptions: { + remarkPlugins: ['remark-slug', ['remark-autolink-headings', { behavior: 'prepend' }]], + rehypePlugins: ['rehype-slug', ['rehype-autolink-headings', { behavior: 'prepend' }]], + }, }; ``` @@ -2049,10 +2055,10 @@ For convenience, you may now also move your `astro.config.js` file to a top-leve ```js export default { - name: '@matthewp/my-renderer', - server: './server.js', - client: './client.js', - hydrationPolyfills: ['./my-polyfill.js'], + name: '@matthewp/my-renderer', + server: './server.js', + client: './client.js', + hydrationPolyfills: ['./my-polyfill.js'], }; ``` diff --git a/packages/astro/package.json b/packages/astro/package.json index 83e49b902c1c..a071e3149064 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,6 +1,6 @@ { "name": "astro", - "version": "0.25.2", + "version": "0.25.3", "description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.", "type": "module", "author": "withastro", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 87511babcc3c..b83cc73b17aa 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -44,7 +44,7 @@ importers: examples/blog: specifiers: '@astrojs/preact': ^0.0.2 - astro: ^0.25.2 + astro: ^0.25.3 preact: ^10.6.6 dependencies: preact: 10.6.6 @@ -55,7 +55,7 @@ importers: examples/blog-multiple-authors: specifiers: '@astrojs/preact': ^0.0.2 - astro: ^0.25.2 + astro: ^0.25.3 preact: ^10.6.6 sass: ^1.49.9 dependencies: @@ -67,14 +67,14 @@ importers: examples/component: specifiers: - astro: ^0.25.2 + astro: ^0.25.3 devDependencies: astro: link:../../packages/astro examples/component/demo: specifiers: '@example/my-component': workspace:* - astro: ^0.25.2 + astro: ^0.25.3 devDependencies: '@example/my-component': link:../packages/my-component astro: link:../../../packages/astro @@ -90,7 +90,7 @@ importers: '@docsearch/css': ^3.0.0 '@docsearch/react': ^3.0.0 '@types/react': ^17.0.43 - astro: ^0.25.2 + astro: ^0.25.3 preact: ^10.6.6 react: ^17.0.2 react-dom: ^17.0.2 @@ -109,13 +109,13 @@ importers: examples/env-vars: specifiers: - astro: ^0.25.2 + astro: ^0.25.3 devDependencies: astro: link:../../packages/astro examples/framework-alpine: specifiers: - astro: ^0.25.2 + astro: ^0.25.3 devDependencies: astro: link:../../packages/astro @@ -123,7 +123,7 @@ importers: specifiers: '@astrojs/lit': ^0.0.2 '@webcomponents/template-shadowroot': ^0.1.0 - astro: ^0.25.2 + astro: ^0.25.3 lit: ^2.2.1 dependencies: '@webcomponents/template-shadowroot': 0.1.0 @@ -141,7 +141,7 @@ importers: '@astrojs/svelte': ^0.0.2 '@astrojs/vue': ^0.0.2 '@webcomponents/template-shadowroot': ^0.1.0 - astro: ^0.25.2 + astro: ^0.25.3 lit: ^2.2.1 preact: ^10.6.6 react: ^17.0.2 @@ -170,7 +170,7 @@ importers: examples/framework-preact: specifiers: '@astrojs/preact': ^0.0.2 - astro: ^0.25.2 + astro: ^0.25.3 preact: ^10.6.6 dependencies: preact: 10.6.6 @@ -181,7 +181,7 @@ importers: examples/framework-react: specifiers: '@astrojs/react': ^0.0.2 - astro: ^0.25.2 + astro: ^0.25.3 react: ^17.0.2 react-dom: ^17.0.2 dependencies: @@ -194,7 +194,7 @@ importers: examples/framework-solid: specifiers: '@astrojs/solid-js': ^0.0.3 - astro: ^0.25.2 + astro: ^0.25.3 solid-js: ^1.3.13 dependencies: solid-js: 1.3.13 @@ -205,7 +205,7 @@ importers: examples/framework-svelte: specifiers: '@astrojs/svelte': ^0.0.2 - astro: ^0.25.2 + astro: ^0.25.3 svelte: ^3.46.4 dependencies: svelte: 3.46.4 @@ -216,7 +216,7 @@ importers: examples/framework-vue: specifiers: '@astrojs/vue': ^0.0.2 - astro: ^0.25.2 + astro: ^0.25.3 vue: ^3.2.31 dependencies: vue: 3.2.31 @@ -233,7 +233,7 @@ importers: '@astrojs/tailwind': ^0.0.2 '@astrojs/turbolinks': ^0.0.2 '@webcomponents/template-shadowroot': ^0.1.0 - astro: ^0.25.2 + astro: ^0.25.3 lit: ^2.2.1 preact: ^10.6.6 react: ^17.0.2 @@ -261,20 +261,20 @@ importers: examples/minimal: specifiers: - astro: ^0.25.2 + astro: ^0.25.3 devDependencies: astro: link:../../packages/astro examples/non-html-pages: specifiers: - astro: ^0.25.2 + astro: ^0.25.3 devDependencies: astro: link:../../packages/astro examples/portfolio: specifiers: '@astrojs/preact': ^0.0.2 - astro: ^0.25.2 + astro: ^0.25.3 preact: ^10.6.6 sass: ^1.49.9 dependencies: @@ -288,7 +288,7 @@ importers: specifiers: '@astrojs/node': ^0.0.2 '@astrojs/svelte': ^0.0.2 - astro: ^0.25.2 + astro: ^0.25.3 concurrently: ^7.0.0 lightcookie: ^1.0.25 svelte: ^3.46.4 @@ -307,14 +307,14 @@ importers: examples/starter: specifiers: - astro: ^0.25.2 + astro: ^0.25.3 devDependencies: astro: link:../../packages/astro examples/subpath: specifiers: '@astrojs/react': ^0.0.2 - astro: ^0.25.2 + astro: ^0.25.3 react: ^17.0.2 react-dom: ^17.0.2 sass: ^1.49.9 @@ -333,7 +333,7 @@ importers: '@astrojs/react': ^0.0.2 '@astrojs/svelte': ^0.0.2 '@astrojs/vue': ^0.0.2 - astro: ^0.25.2 + astro: ^0.25.3 preact: ^10.6.6 react: ^17.0.2 react-dom: ^17.0.2 @@ -356,7 +356,7 @@ importers: examples/with-markdown-plugins: specifiers: '@astrojs/markdown-remark': ^0.7.0 - astro: ^0.25.2 + astro: ^0.25.3 hast-util-select: 5.0.1 rehype-autolink-headings: ^6.1.1 rehype-slug: ^5.0.1 @@ -374,7 +374,7 @@ importers: examples/with-markdown-shiki: specifiers: '@astrojs/markdown-remark': ^0.7.0 - astro: ^0.25.2 + astro: ^0.25.3 devDependencies: '@astrojs/markdown-remark': link:../../packages/markdown/remark astro: link:../../packages/astro @@ -389,7 +389,7 @@ importers: '@nanostores/preact': ^0.1.3 '@nanostores/react': ^0.1.5 '@nanostores/vue': ^0.4.1 - astro: ^0.25.2 + astro: ^0.25.3 nanostores: ^0.5.12 preact: ^10.6.6 react: ^17.0.2 @@ -417,7 +417,7 @@ importers: examples/with-tailwindcss: specifiers: '@astrojs/tailwind': ^0.0.2 - astro: ^0.25.2 + astro: ^0.25.3 autoprefixer: ^10.4.4 canvas-confetti: ^1.5.1 postcss: ^8.4.12 @@ -432,7 +432,7 @@ importers: examples/with-vite-plugin-pwa: specifiers: - astro: ^0.25.2 + astro: ^0.25.3 vite-plugin-pwa: 0.11.11 workbox-window: ^6.5.2 devDependencies: From 6667c41f00bb1ae6407a78b6041b2af42fe067e8 Mon Sep 17 00:00:00 2001 From: matthewp Date: Mon, 28 Mar 2022 20:53:24 +0000 Subject: [PATCH 5/9] [ci] format --- packages/astro/CHANGELOG.md | 64 ++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index 64d945c285fd..b106e3fa47cf 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -47,7 +47,7 @@ import netlify from '@astrojs/netlify/functions'; export default defineConfig({ - adapter: netlify(), + adapter: netlify(), }); ``` @@ -67,7 +67,7 @@ import nodejs from '@astrojs/node'; export default { - adapter: nodejs(), + adapter: nodejs(), }; ``` @@ -127,7 +127,7 @@ import nodejs from '@astrojs/node'; export default { - adapter: nodejs(), + adapter: nodejs(), }; ``` @@ -223,7 +223,7 @@ import { defineConfig } from 'astro/config'; export default defineConfig({ - renderers: [], + renderers: [], }); ``` @@ -261,9 +261,9 @@ ```json { - "scripts": { - "build": "astro build --legacy-build" - } + "scripts": { + "build": "astro build --legacy-build" + } } ``` @@ -283,7 +283,7 @@ ```ts if (Astro.slots.has('default')) { - const content = await Astro.slots.render('default'); + const content = await Astro.slots.render('default'); } ``` @@ -367,7 +367,7 @@ ```ts if (Astro.slots.has('default')) { - const content = await Astro.slots.render('default'); + const content = await Astro.slots.render('default'); } ``` @@ -391,9 +391,9 @@ ```json { - "scripts": { - "build": "astro build --legacy-build" - } + "scripts": { + "build": "astro build --legacy-build" + } } ``` @@ -505,12 +505,12 @@ ```typescript // src/pages/company.json.ts export async function get() { - return { - body: JSON.stringify({ - name: 'Astro Technology Company', - url: 'https://astro.build/', - }), - }; + return { + body: JSON.stringify({ + name: 'Astro Technology Company', + url: 'https://astro.build/', + }), + }; } ``` @@ -672,12 +672,12 @@ ```typescript // src/pages/company.json.ts export async function get() { - return { - body: JSON.stringify({ - name: 'Astro Technology Company', - url: 'https://astro.build/', - }), - }; + return { + body: JSON.stringify({ + name: 'Astro Technology Company', + url: 'https://astro.build/', + }), + }; } ``` @@ -2032,10 +2032,10 @@ For convenience, you may now also move your `astro.config.js` file to a top-leve ```js export default { - markdownOptions: { - remarkPlugins: ['remark-slug', ['remark-autolink-headings', { behavior: 'prepend' }]], - rehypePlugins: ['rehype-slug', ['rehype-autolink-headings', { behavior: 'prepend' }]], - }, + markdownOptions: { + remarkPlugins: ['remark-slug', ['remark-autolink-headings', { behavior: 'prepend' }]], + rehypePlugins: ['rehype-slug', ['rehype-autolink-headings', { behavior: 'prepend' }]], + }, }; ``` @@ -2055,10 +2055,10 @@ For convenience, you may now also move your `astro.config.js` file to a top-leve ```js export default { - name: '@matthewp/my-renderer', - server: './server.js', - client: './client.js', - hydrationPolyfills: ['./my-polyfill.js'], + name: '@matthewp/my-renderer', + server: './server.js', + client: './client.js', + hydrationPolyfills: ['./my-polyfill.js'], }; ``` From f452a40e9e3bed1527e2c4590a4d40b314d9058e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Seery?= Date: Mon, 28 Mar 2022 18:17:05 -0300 Subject: [PATCH 6/9] Removed syntax files (#2516) --- .../syntaxes/astro-markdown.tmLanguage.json | 2781 ----------------- tools/vscode/syntaxes/astro.tmLanguage.json | 774 ----- 2 files changed, 3555 deletions(-) delete mode 100644 tools/vscode/syntaxes/astro-markdown.tmLanguage.json delete mode 100644 tools/vscode/syntaxes/astro.tmLanguage.json diff --git a/tools/vscode/syntaxes/astro-markdown.tmLanguage.json b/tools/vscode/syntaxes/astro-markdown.tmLanguage.json deleted file mode 100644 index be230cc62209..000000000000 --- a/tools/vscode/syntaxes/astro-markdown.tmLanguage.json +++ /dev/null @@ -1,2781 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", - "information_for_contributors": ["This file has been modified from https://github.com/microsoft/vscode-markdown-tm-grammar/commit/399ff6f608a7bef3f68713be23cdcb4c6d475804"], - "name": "Astro Markdown", - "scopeName": "text.html.markdown.astro", - "patterns": [ - { - "include": "#block" - }, - { - "include": "#astro-expressions" - } - ], - "repository": { - "astro-expressions": { - "patterns": [ - { - "begin": "(\\{)", - "beginCaptures": { - "1": { - "name": "punctuation.definition.raw.markdown" - } - }, - "end": "(\\})", - "endCaptures": { - "1": { - "name": "punctuation.definition.raw.markdown" - } - }, - "name": "expression.embbeded.astro", - "patterns": [ - { - "include": "source.tsx" - } - ] - } - ] - }, - "block": { - "patterns": [ - { - "include": "#separator" - }, - { - "include": "#heading" - }, - { - "include": "#blockquote" - }, - { - "include": "#lists" - }, - { - "include": "#fenced_code_block" - }, - { - "include": "#link-def" - }, - { - "include": "#html" - }, - { - "include": "#paragraph" - }, - { - "include": "#astro-expressions" - } - ] - }, - "blockquote": { - "begin": "(^|\\G)\\s*(>) ?", - "captures": { - "2": { - "name": "punctuation.definition.quote.begin.markdown" - } - }, - "name": "markup.quote.markdown", - "patterns": [ - { - "include": "#block" - } - ], - "while": "(^|\\G)\\s*(>) ?" - }, - "fenced_code_block_astro": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(astro)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s*)(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.astro", - "patterns": [ - { - "include": "text.html.astro" - } - ] - } - ] - }, - "fenced_code_block_css": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(css|css.erb)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.css", - "patterns": [ - { - "include": "source.css" - } - ] - } - ] - }, - "fenced_code_block_basic": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(html|htm|shtml|xhtml|inc|tmpl|tpl)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.html", - "patterns": [ - { - "include": "text.html.basic" - } - ] - } - ] - }, - "fenced_code_block_ini": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(ini|conf)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.ini", - "patterns": [ - { - "include": "source.ini" - } - ] - } - ] - }, - "fenced_code_block_java": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(java|bsh)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.java", - "patterns": [ - { - "include": "source.java" - } - ] - } - ] - }, - "fenced_code_block_lua": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(lua)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.lua", - "patterns": [ - { - "include": "source.lua" - } - ] - } - ] - }, - "fenced_code_block_makefile": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(Makefile|makefile|GNUmakefile|OCamlMakefile)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.makefile", - "patterns": [ - { - "include": "source.makefile" - } - ] - } - ] - }, - "fenced_code_block_perl": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(perl|pl|pm|pod|t|PL|psgi|vcl)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.perl", - "patterns": [ - { - "include": "source.perl" - } - ] - } - ] - }, - "fenced_code_block_r": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(R|r|s|S|Rprofile|\\{\\.r.+?\\})((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.r", - "patterns": [ - { - "include": "source.r" - } - ] - } - ] - }, - "fenced_code_block_ruby": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(ruby|rb|rbx|rjs|Rakefile|rake|cgi|fcgi|gemspec|irbrc|Capfile|ru|prawn|Cheffile|Gemfile|Guardfile|Hobofile|Vagrantfile|Appraisals|Rantfile|Berksfile|Berksfile.lock|Thorfile|Puppetfile)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.ruby", - "patterns": [ - { - "include": "source.ruby" - } - ] - } - ] - }, - "fenced_code_block_php": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(php|php3|php4|php5|phpt|phtml|aw|ctp)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.php", - "patterns": [ - { - "include": "text.html.basic" - }, - { - "include": "source.php" - } - ] - } - ] - }, - "fenced_code_block_sql": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(sql|ddl|dml)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.sql", - "patterns": [ - { - "include": "source.sql" - } - ] - } - ] - }, - "fenced_code_block_vs_net": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(vb)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.vs_net", - "patterns": [ - { - "include": "source.asp.vb.net" - } - ] - } - ] - }, - "fenced_code_block_xml": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(xml|xsd|tld|jsp|pt|cpt|dtml|rss|opml)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.xml", - "patterns": [ - { - "include": "text.xml" - } - ] - } - ] - }, - "fenced_code_block_xsl": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(xsl|xslt)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.xsl", - "patterns": [ - { - "include": "text.xml.xsl" - } - ] - } - ] - }, - "fenced_code_block_yaml": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(yaml|yml)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.yaml", - "patterns": [ - { - "include": "source.yaml" - } - ] - } - ] - }, - "fenced_code_block_dosbatch": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(bat|batch)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.dosbatch", - "patterns": [ - { - "include": "source.batchfile" - } - ] - } - ] - }, - "fenced_code_block_clojure": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(clj|cljs|clojure)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.clojure", - "patterns": [ - { - "include": "source.clojure" - } - ] - } - ] - }, - "fenced_code_block_coffee": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(coffee|Cakefile|coffee.erb)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.coffee", - "patterns": [ - { - "include": "source.coffee" - } - ] - } - ] - }, - "fenced_code_block_c": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(c|h)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.c", - "patterns": [ - { - "include": "source.c" - } - ] - } - ] - }, - "fenced_code_block_cpp": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(cpp|c\\+\\+|cxx)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.cpp source.cpp", - "patterns": [ - { - "include": "source.cpp" - } - ] - } - ] - }, - "fenced_code_block_diff": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(patch|diff|rej)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.diff", - "patterns": [ - { - "include": "source.diff" - } - ] - } - ] - }, - "fenced_code_block_dockerfile": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(dockerfile|Dockerfile)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.dockerfile", - "patterns": [ - { - "include": "source.dockerfile" - } - ] - } - ] - }, - "fenced_code_block_git_commit": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(COMMIT_EDITMSG|MERGE_MSG)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.git_commit", - "patterns": [ - { - "include": "text.git-commit" - } - ] - } - ] - }, - "fenced_code_block_git_rebase": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(git-rebase-todo)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.git_rebase", - "patterns": [ - { - "include": "text.git-rebase" - } - ] - } - ] - }, - "fenced_code_block_go": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(go|golang)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.go", - "patterns": [ - { - "include": "source.go" - } - ] - } - ] - }, - "fenced_code_block_groovy": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(groovy|gvy)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.groovy", - "patterns": [ - { - "include": "source.groovy" - } - ] - } - ] - }, - "fenced_code_block_pug": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(jade|pug)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.pug", - "patterns": [ - { - "include": "text.pug" - } - ] - } - ] - }, - "fenced_code_block_js": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(js|jsx|javascript|es6|mjs|cjs|\\{\\.js.+?\\})((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.javascript", - "patterns": [ - { - "include": "source.js" - } - ] - } - ] - }, - "fenced_code_block_js_regexp": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(regexp)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.js_regexp", - "patterns": [ - { - "include": "source.js.regexp" - } - ] - } - ] - }, - "fenced_code_block_json": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(json|json5|sublime-settings|sublime-menu|sublime-keymap|sublime-mousemap|sublime-theme|sublime-build|sublime-project|sublime-completions)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.json", - "patterns": [ - { - "include": "source.json" - } - ] - } - ] - }, - "fenced_code_block_jsonc": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(jsonc)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.jsonc", - "patterns": [ - { - "include": "source.json.comments" - } - ] - } - ] - }, - "fenced_code_block_less": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(less)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.less", - "patterns": [ - { - "include": "source.css.less" - } - ] - } - ] - }, - "fenced_code_block_objc": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(objectivec|objective-c|mm|objc|obj-c|m|h)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.objc", - "patterns": [ - { - "include": "source.objc" - } - ] - } - ] - }, - "fenced_code_block_swift": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(swift)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.swift", - "patterns": [ - { - "include": "source.swift" - } - ] - } - ] - }, - "fenced_code_block_scss": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(scss)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.scss", - "patterns": [ - { - "include": "source.css.scss" - } - ] - } - ] - }, - "fenced_code_block_perl6": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(perl6|p6|pl6|pm6|nqp)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.perl6", - "patterns": [ - { - "include": "source.perl.6" - } - ] - } - ] - }, - "fenced_code_block_powershell": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(powershell|ps1|psm1|psd1)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.powershell", - "patterns": [ - { - "include": "source.powershell" - } - ] - } - ] - }, - "fenced_code_block_python": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(python|py|py3|rpy|pyw|cpy|SConstruct|Sconstruct|sconstruct|SConscript|gyp|gypi|\\{\\.python.+?\\})((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.python", - "patterns": [ - { - "include": "source.python" - } - ] - } - ] - }, - "fenced_code_block_regexp_python": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(re)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.regexp_python", - "patterns": [ - { - "include": "source.regexp.python" - } - ] - } - ] - }, - "fenced_code_block_rust": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(rust|rs|\\{\\.rust.+?\\})((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.rust", - "patterns": [ - { - "include": "source.rust" - } - ] - } - ] - }, - "fenced_code_block_scala": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(scala|sbt)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.scala", - "patterns": [ - { - "include": "source.scala" - } - ] - } - ] - }, - "fenced_code_block_shell": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(shell|sh|bash|zsh|bashrc|bash_profile|bash_login|profile|bash_logout|.textmate_init|\\{\\.bash.+?\\})((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.shellscript", - "patterns": [ - { - "include": "source.shell" - } - ] - } - ] - }, - "fenced_code_block_ts": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(typescript|ts)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.typescript", - "patterns": [ - { - "include": "source.ts" - } - ] - } - ] - }, - "fenced_code_block_tsx": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(tsx)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.typescriptreact", - "patterns": [ - { - "include": "source.tsx" - } - ] - } - ] - }, - "fenced_code_block_csharp": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(cs|csharp|c#)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.csharp", - "patterns": [ - { - "include": "source.cs" - } - ] - } - ] - }, - "fenced_code_block_fsharp": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(fs|fsharp|f#)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.fsharp", - "patterns": [ - { - "include": "source.fsharp" - } - ] - } - ] - }, - "fenced_code_block_dart": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(dart)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.dart", - "patterns": [ - { - "include": "source.dart" - } - ] - } - ] - }, - "fenced_code_block_handlebars": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(handlebars|hbs)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.handlebars", - "patterns": [ - { - "include": "text.html.handlebars" - } - ] - } - ] - }, - "fenced_code_block_markdown": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(markdown|md)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.markdown", - "patterns": [ - { - "include": "text.html.markdown" - } - ] - } - ] - }, - "fenced_code_block_log": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(log)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.log", - "patterns": [ - { - "include": "text.log" - } - ] - } - ] - }, - "fenced_code_block_erlang": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(erlang)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.erlang", - "patterns": [ - { - "include": "source.erlang" - } - ] - } - ] - }, - "fenced_code_block_elixir": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(elixir)((\\s+|:|\\{)[^`~]*)?$)", - "name": "markup.fenced_code.block.markdown", - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language.markdown" - }, - "5": { - "name": "fenced_code.block.language.attributes.markdown" - } - }, - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "patterns": [ - { - "begin": "(^|\\G)(\\s*)(.*)", - "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", - "contentName": "meta.embedded.block.elixir", - "patterns": [ - { - "include": "source.elixir" - } - ] - } - ] - }, - "fenced_code_block": { - "patterns": [ - { - "include": "#fenced_code_block_css" - }, - { - "include": "#fenced_code_block_astro" - }, - { - "include": "#fenced_code_block_basic" - }, - { - "include": "#fenced_code_block_ini" - }, - { - "include": "#fenced_code_block_java" - }, - { - "include": "#fenced_code_block_lua" - }, - { - "include": "#fenced_code_block_makefile" - }, - { - "include": "#fenced_code_block_perl" - }, - { - "include": "#fenced_code_block_r" - }, - { - "include": "#fenced_code_block_ruby" - }, - { - "include": "#fenced_code_block_php" - }, - { - "include": "#fenced_code_block_sql" - }, - { - "include": "#fenced_code_block_vs_net" - }, - { - "include": "#fenced_code_block_xml" - }, - { - "include": "#fenced_code_block_xsl" - }, - { - "include": "#fenced_code_block_yaml" - }, - { - "include": "#fenced_code_block_dosbatch" - }, - { - "include": "#fenced_code_block_clojure" - }, - { - "include": "#fenced_code_block_coffee" - }, - { - "include": "#fenced_code_block_c" - }, - { - "include": "#fenced_code_block_cpp" - }, - { - "include": "#fenced_code_block_diff" - }, - { - "include": "#fenced_code_block_dockerfile" - }, - { - "include": "#fenced_code_block_git_commit" - }, - { - "include": "#fenced_code_block_git_rebase" - }, - { - "include": "#fenced_code_block_go" - }, - { - "include": "#fenced_code_block_groovy" - }, - { - "include": "#fenced_code_block_pug" - }, - { - "include": "#fenced_code_block_js" - }, - { - "include": "#fenced_code_block_js_regexp" - }, - { - "include": "#fenced_code_block_json" - }, - { - "include": "#fenced_code_block_jsonc" - }, - { - "include": "#fenced_code_block_less" - }, - { - "include": "#fenced_code_block_objc" - }, - { - "include": "#fenced_code_block_swift" - }, - { - "include": "#fenced_code_block_scss" - }, - { - "include": "#fenced_code_block_perl6" - }, - { - "include": "#fenced_code_block_powershell" - }, - { - "include": "#fenced_code_block_python" - }, - { - "include": "#fenced_code_block_regexp_python" - }, - { - "include": "#fenced_code_block_rust" - }, - { - "include": "#fenced_code_block_scala" - }, - { - "include": "#fenced_code_block_shell" - }, - { - "include": "#fenced_code_block_ts" - }, - { - "include": "#fenced_code_block_tsx" - }, - { - "include": "#fenced_code_block_csharp" - }, - { - "include": "#fenced_code_block_fsharp" - }, - { - "include": "#fenced_code_block_dart" - }, - { - "include": "#fenced_code_block_handlebars" - }, - { - "include": "#fenced_code_block_markdown" - }, - { - "include": "#fenced_code_block_log" - }, - { - "include": "#fenced_code_block_erlang" - }, - { - "include": "#fenced_code_block_elixir" - }, - { - "include": "#fenced_code_block_unknown" - } - ] - }, - "fenced_code_block_unknown": { - "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?=([^`~]*)?$)", - "beginCaptures": { - "3": { - "name": "punctuation.definition.markdown" - }, - "4": { - "name": "fenced_code.block.language" - } - }, - "end": "(^|\\G)(\\2|\\s{0,})(\\3)\\s*$", - "endCaptures": { - "3": { - "name": "punctuation.definition.markdown" - } - }, - "name": "markup.fenced_code.block.markdown" - }, - "heading": { - "match": "(?:^|\\G)\\s*(#{1,6}\\s+(.*?)(\\s+#{1,6})?\\s*)$", - "captures": { - "1": { - "patterns": [ - { - "match": "(#{6})\\s+(.*?)(?:\\s+(#+))?\\s*$", - "name": "heading.6.markdown", - "captures": { - "1": { - "name": "punctuation.definition.heading.markdown" - }, - "2": { - "name": "entity.name.section.markdown", - "patterns": [ - { - "include": "#inline" - }, - { - "include": "text.html.astro" - } - ] - }, - "3": { - "name": "punctuation.definition.heading.markdown" - } - } - }, - { - "match": "(#{5})\\s+(.*?)(?:\\s+(#+))?\\s*$", - "name": "heading.5.markdown", - "captures": { - "1": { - "name": "punctuation.definition.heading.markdown" - }, - "2": { - "name": "entity.name.section.markdown", - "patterns": [ - { - "include": "#inline" - }, - { - "include": "text.html.astro" - } - ] - }, - "3": { - "name": "punctuation.definition.heading.markdown" - } - } - }, - { - "match": "(#{4})\\s+(.*?)(?:\\s+(#+))?\\s*$", - "name": "heading.4.markdown", - "captures": { - "1": { - "name": "punctuation.definition.heading.markdown" - }, - "2": { - "name": "entity.name.section.markdown", - "patterns": [ - { - "include": "#inline" - }, - { - "include": "text.html.astro" - } - ] - }, - "3": { - "name": "punctuation.definition.heading.markdown" - } - } - }, - { - "match": "(#{3})\\s+(.*?)(?:\\s+(#+))?\\s*$", - "name": "heading.3.markdown", - "captures": { - "1": { - "name": "punctuation.definition.heading.markdown" - }, - "2": { - "name": "entity.name.section.markdown", - "patterns": [ - { - "include": "#inline" - }, - { - "include": "text.html.astro" - } - ] - }, - "3": { - "name": "punctuation.definition.heading.markdown" - } - } - }, - { - "match": "(#{2})\\s+(.*?)(?:\\s+(#+))?\\s*$", - "name": "heading.2.markdown", - "captures": { - "1": { - "name": "punctuation.definition.heading.markdown" - }, - "2": { - "name": "entity.name.section.markdown", - "patterns": [ - { - "include": "#inline" - }, - { - "include": "text.html.astro" - } - ] - }, - "3": { - "name": "punctuation.definition.heading.markdown" - } - } - }, - { - "match": "(#{1})\\s+(.*?)(?:\\s+(#+))?\\s*$", - "name": "heading.1.markdown", - "captures": { - "1": { - "name": "punctuation.definition.heading.markdown" - }, - "2": { - "name": "entity.name.section.markdown", - "patterns": [ - { - "include": "#inline" - }, - { - "include": "text.html.astro" - } - ] - }, - "3": { - "name": "punctuation.definition.heading.markdown" - } - } - } - ] - } - }, - "name": "markup.heading.markdown", - "patterns": [ - { - "include": "#inline" - } - ] - }, - "heading-setext": { - "patterns": [ - { - "match": "^(={3,})(?=[ \\t]*$\\n?)", - "name": "markup.heading.setext.1.markdown" - }, - { - "match": "^(-{3,})(?=[ \\t]*$\\n?)", - "name": "markup.heading.setext.2.markdown" - } - ] - }, - "html": { - "patterns": [ - { - "begin": "(^|\\G)\\s*()", - "name": "comment.block.html" - }, - { - "begin": "(?i)(?=))", - "while": "(?i)^(?!.*)", - "patterns": [ - { - "include": "text.html.astro" - } - ] - }, - { - "begin": "(?=(<[a-zA-Z0-9\\-](/?>|\\s.*?>)|)\\s*$)", - "patterns": [ - { - "include": "text.html.astro" - } - ], - "while": "(?i)^(?!.*)" - } - ] - }, - "link-def": { - "captures": { - "1": { - "name": "punctuation.definition.constant.markdown" - }, - "2": { - "name": "constant.other.reference.link.markdown" - }, - "3": { - "name": "punctuation.definition.constant.markdown" - }, - "4": { - "name": "punctuation.separator.key-value.markdown" - }, - "5": { - "name": "punctuation.definition.link.markdown" - }, - "6": { - "name": "markup.underline.link.markdown" - }, - "7": { - "name": "punctuation.definition.link.markdown" - }, - "8": { - "name": "string.other.link.description.title.markdown" - }, - "9": { - "name": "punctuation.definition.string.begin.markdown" - }, - "10": { - "name": "punctuation.definition.string.end.markdown" - }, - "11": { - "name": "string.other.link.description.title.markdown" - }, - "12": { - "name": "punctuation.definition.string.begin.markdown" - }, - "13": { - "name": "punctuation.definition.string.end.markdown" - }, - "14": { - "name": "string.other.link.description.title.markdown" - }, - "15": { - "name": "punctuation.definition.string.begin.markdown" - }, - "16": { - "name": "punctuation.definition.string.end.markdown" - } - }, - "match": "(?x)\n \\s* # Leading whitespace\n (\\[)([^]]+?)(\\])(:) # Reference name\n [ \\t]* # Optional whitespace\n (?) # The url\n [ \\t]* # Optional whitespace\n (?:\n ((\\().+?(\\))) # Match title in parens…\n | ((\").+?(\")) # or in double quotes…\n | ((').+?(')) # or in single quotes.\n )? # Title is optional\n \\s* # Optional whitespace\n $\n", - "name": "meta.link.reference.def.markdown" - }, - "list_paragraph": { - "begin": "(^|\\G)(?=\\S)(?![*+->]\\s|[0-9]+\\.\\s)", - "name": "meta.paragraph.markdown", - "patterns": [ - { - "include": "#inline" - }, - { - "include": "text.html.astro" - }, - { - "include": "#heading-setext" - } - ], - "while": "(^|\\G)(?!\\s*$|#|\\s*([-*_>][ ]{2,}){3,}[ \\t]*$\\n?|\\s*[*+->]|\\s*[0-9]+\\.)" - }, - "lists": { - "patterns": [ - { - "begin": "(^|\\G)(\\s*)([*+-])([ \\t])", - "beginCaptures": { - "3": { - "name": "punctuation.definition.list.begin.markdown" - } - }, - "comment": "Currently does not support un-indented second lines.", - "name": "markup.list.unnumbered.markdown", - "patterns": [ - { - "include": "#block" - }, - { - "include": "#list_paragraph" - } - ], - "while": "((^|\\G)([ ]{2,4}|\\t))|(^[ \\t]*$)" - }, - { - "begin": "(^|\\G)(\\s*)([0-9]+\\.)([ \\t])", - "beginCaptures": { - "3": { - "name": "punctuation.definition.list.begin.markdown" - } - }, - "name": "markup.list.numbered.markdown", - "patterns": [ - { - "include": "#block" - }, - { - "include": "#list_paragraph" - } - ], - "while": "((^|\\G)([ ]{2,4}|\\t))|(^[ \\t]*$)" - } - ] - }, - "paragraph": { - "begin": "(^|\\G)\\s*(?=\\S)", - "name": "meta.paragraph.markdown", - "patterns": [ - { - "include": "#inline" - }, - { - "include": "text.html.astro" - }, - { - "include": "#heading-setext" - } - ], - "while": "(^|\\G)(?=\\s*[-=]{3,}\\s*$)" - }, - "separator": { - "match": "(^|\\G)\\s*([\\*\\-\\_])([ ]{0,2}\\2){2,}[ \\t]*$\\n?", - "name": "meta.separator.markdown" - }, - "inline": { - "patterns": [ - { - "include": "#ampersand" - }, - { - "include": "#bracket" - }, - { - "include": "#bold" - }, - { - "include": "#italic" - }, - { - "include": "#raw" - }, - { - "include": "#escape" - }, - { - "include": "#image-inline" - }, - { - "include": "#image-ref" - }, - { - "include": "#link-email" - }, - { - "include": "#link-inet" - }, - { - "include": "#link-inline" - }, - { - "include": "#link-ref" - }, - { - "include": "#link-ref-literal" - }, - { - "include": "#link-ref-shortcut" - }, - { - "include": "#astro-expressions" - } - ] - }, - "ampersand": { - "comment": "Markdown will convert this for us. We match it so that the HTML grammar will not mark it up as invalid.", - "match": "&(?!([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+);)", - "name": "meta.other.valid-ampersand.markdown" - }, - "bold": { - "begin": "(?x) (?(\\*\\*(?=\\w)|(?]*+> # HTML tags\n | (?`+)([^`]|(?!(?(?!`))`)*+\\k\n # Raw\n | \\\\[\\\\`*_{}\\[\\]()#.!+\\->]?+ # Escapes\n | \\[\n (\n (? # Named group\n [^\\[\\]\\\\] # Match most chars\n | \\\\. # Escaped chars\n | \\[ \\g*+ \\] # Nested brackets\n )*+\n \\]\n (\n ( # Reference Link\n [ ]? # Optional space\n \\[[^\\]]*+\\] # Ref name\n )\n | ( # Inline Link\n \\( # Opening paren\n [ \\t]*+ # Optional whitespace\n ? # URL\n [ \\t]*+ # Optional whitespace\n ( # Optional Title\n (?['\"])\n (.*?)\n \\k<title>\n )?\n \\)\n )\n )\n )\n | (?!(?<=\\S)\\k<open>). # Everything besides\n # style closer\n )++\n (?<=\\S)(?=__\\b|\\*\\*)\\k<open> # Close\n)\n", - "captures": { - "1": { - "name": "punctuation.definition.bold.markdown" - } - }, - "end": "(?<=\\S)(\\1)", - "name": "markup.bold.markdown", - "patterns": [ - { - "applyEndPatternLast": 1, - "begin": "(?=<[^>]*?>)", - "end": "(?<=>)", - "patterns": [ - { - "include": "text.html.astro" - } - ] - }, - { - "include": "#escape" - }, - { - "include": "#ampersand" - }, - { - "include": "#bracket" - }, - { - "include": "#raw" - }, - { - "include": "#bold" - }, - { - "include": "#italic" - }, - { - "include": "#image-inline" - }, - { - "include": "#link-inline" - }, - { - "include": "#link-inet" - }, - { - "include": "#link-email" - }, - { - "include": "#image-ref" - }, - { - "include": "#link-ref-literal" - }, - { - "include": "#link-ref" - }, - { - "include": "#link-ref-shortcut" - } - ] - }, - "bracket": { - "comment": "Markdown will convert this for us. We match it so that the HTML grammar will not mark it up as invalid.", - "match": "<(?![a-zA-Z/?\\$!])", - "name": "meta.other.valid-bracket.markdown" - }, - "escape": { - "match": "\\\\[-`*_#+.!(){}\\[\\]\\\\>]", - "name": "constant.character.escape.markdown" - }, - "image-inline": { - "captures": { - "1": { - "name": "punctuation.definition.string.begin.markdown" - }, - "2": { - "name": "string.other.link.description.markdown" - }, - "4": { - "name": "punctuation.definition.string.end.markdown" - }, - "5": { - "name": "punctuation.definition.metadata.markdown" - }, - "6": { - "name": "punctuation.definition.link.markdown" - }, - "7": { - "name": "markup.underline.link.image.markdown" - }, - "8": { - "name": "punctuation.definition.link.markdown" - }, - "9": { - "name": "string.other.link.description.title.markdown" - }, - "10": { - "name": "punctuation.definition.string.markdown" - }, - "11": { - "name": "punctuation.definition.string.markdown" - }, - "12": { - "name": "string.other.link.description.title.markdown" - }, - "13": { - "name": "punctuation.definition.string.markdown" - }, - "14": { - "name": "punctuation.definition.string.markdown" - }, - "15": { - "name": "string.other.link.description.title.markdown" - }, - "16": { - "name": "punctuation.definition.string.markdown" - }, - "17": { - "name": "punctuation.definition.string.markdown" - }, - "18": { - "name": "punctuation.definition.metadata.markdown" - } - }, - "match": "(?x)\n (\\!\\[)((?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])*+)(\\])\n # Match the link text.\n (\\() # Opening paren for url\n (<?)(\\S+?)(>?) # The url\n [ \\t]* # Optional whitespace\n (?:\n ((\\().+?(\\))) # Match title in parens…\n | ((\").+?(\")) # or in double quotes…\n | ((').+?(')) # or in single quotes.\n )? # Title is optional\n \\s* # Optional whitespace\n (\\))\n", - "name": "meta.image.inline.markdown" - }, - "image-ref": { - "captures": { - "1": { - "name": "punctuation.definition.string.begin.markdown" - }, - "2": { - "name": "string.other.link.description.markdown" - }, - "4": { - "name": "punctuation.definition.string.begin.markdown" - }, - "5": { - "name": "punctuation.definition.constant.markdown" - }, - "6": { - "name": "constant.other.reference.link.markdown" - }, - "7": { - "name": "punctuation.definition.constant.markdown" - } - }, - "match": "(\\!\\[)((?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])*+)(\\])[ ]?(\\[)(.*?)(\\])", - "name": "meta.image.reference.markdown" - }, - "italic": { - "begin": "(?x) (?<open>(\\*(?=\\w)|(?<!\\w)\\*|(?<!\\w)\\b_))(?=\\S) # Open\n (?=\n (\n <[^>]*+> # HTML tags\n | (?<raw>`+)([^`]|(?!(?<!`)\\k<raw>(?!`))`)*+\\k<raw>\n # Raw\n | \\\\[\\\\`*_{}\\[\\]()#.!+\\->]?+ # Escapes\n | \\[\n (\n (?<square> # Named group\n [^\\[\\]\\\\] # Match most chars\n | \\\\. # Escaped chars\n | \\[ \\g<square>*+ \\] # Nested brackets\n )*+\n \\]\n (\n ( # Reference Link\n [ ]? # Optional space\n \\[[^\\]]*+\\] # Ref name\n )\n | ( # Inline Link\n \\( # Opening paren\n [ \\t]*+ # Optional whtiespace\n <?(.*?)>? # URL\n [ \\t]*+ # Optional whtiespace\n ( # Optional Title\n (?<title>['\"])\n (.*?)\n \\k<title>\n )?\n \\)\n )\n )\n )\n | \\k<open>\\k<open> # Must be bold closer\n | (?!(?<=\\S)\\k<open>). # Everything besides\n # style closer\n )++\n (?<=\\S)(?=_\\b|\\*)\\k<open> # Close\n )\n", - "captures": { - "1": { - "name": "punctuation.definition.italic.markdown" - } - }, - "end": "(?<=\\S)(\\1)((?!\\1)|(?=\\1\\1))", - "name": "markup.italic.markdown", - "patterns": [ - { - "applyEndPatternLast": 1, - "begin": "(?=<[^>]*?>)", - "end": "(?<=>)", - "patterns": [ - { - "include": "text.html.astro" - } - ] - }, - { - "include": "#escape" - }, - { - "include": "#ampersand" - }, - { - "include": "#bracket" - }, - { - "include": "#raw" - }, - { - "include": "#bold" - }, - { - "include": "#image-inline" - }, - { - "include": "#link-inline" - }, - { - "include": "#link-inet" - }, - { - "include": "#link-email" - }, - { - "include": "#image-ref" - }, - { - "include": "#link-ref-literal" - }, - { - "include": "#link-ref" - }, - { - "include": "#link-ref-shortcut" - } - ] - }, - "link-email": { - "captures": { - "1": { - "name": "punctuation.definition.link.markdown" - }, - "2": { - "name": "markup.underline.link.markdown" - }, - "4": { - "name": "punctuation.definition.link.markdown" - } - }, - "match": "(<)((?:mailto:)?[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*)(>)", - "name": "meta.link.email.lt-gt.markdown" - }, - "link-inet": { - "captures": { - "1": { - "name": "punctuation.definition.link.markdown" - }, - "2": { - "name": "markup.underline.link.markdown" - }, - "3": { - "name": "punctuation.definition.link.markdown" - } - }, - "match": "(<)((?:https?|ftp)://.*?)(>)", - "name": "meta.link.inet.markdown" - }, - "link-inline": { - "captures": { - "1": { - "name": "punctuation.definition.string.begin.markdown" - }, - "2": { - "name": "string.other.link.title.markdown" - }, - "4": { - "name": "punctuation.definition.string.end.markdown" - }, - "5": { - "name": "punctuation.definition.metadata.markdown" - }, - "6": { - "name": "punctuation.definition.link.markdown" - }, - "7": { - "name": "markup.underline.link.markdown" - }, - "9": { - "name": "punctuation.definition.link.markdown" - }, - "10": { - "name": "string.other.link.description.title.markdown" - }, - "11": { - "name": "punctuation.definition.string.begin.markdown" - }, - "12": { - "name": "punctuation.definition.string.end.markdown" - }, - "13": { - "name": "string.other.link.description.title.markdown" - }, - "14": { - "name": "punctuation.definition.string.begin.markdown" - }, - "15": { - "name": "punctuation.definition.string.end.markdown" - }, - "16": { - "name": "string.other.link.description.title.markdown" - }, - "17": { - "name": "punctuation.definition.string.begin.markdown" - }, - "18": { - "name": "punctuation.definition.string.end.markdown" - }, - "19": { - "name": "punctuation.definition.metadata.markdown" - } - }, - "match": "(?x)\n (\\[)((?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])*+)(\\])\n # Match the link text.\n (\\() # Opening paren for url\n (<?)((?<url>(?>[^\\s()]+)|\\(\\g<url>*\\))*)(>?) # The url\n [ \\t]* # Optional whitespace\n (?:\n ((\\().+?(\\))) # Match title in parens…\n | ((\").+?(\")) # or in double quotes…\n | ((').+?(')) # or in single quotes.\n )? # Title is optional\n \\s* # Optional whitespace\n (\\))\n", - "name": "meta.link.inline.markdown" - }, - "link-ref": { - "captures": { - "1": { - "name": "punctuation.definition.string.begin.markdown" - }, - "2": { - "name": "string.other.link.title.markdown" - }, - "4": { - "name": "punctuation.definition.string.end.markdown" - }, - "5": { - "name": "punctuation.definition.constant.begin.markdown" - }, - "6": { - "name": "constant.other.reference.link.markdown" - }, - "7": { - "name": "punctuation.definition.constant.end.markdown" - } - }, - "match": "(\\[)((?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])*+)(\\])(\\[)([^\\]]*+)(\\])", - "name": "meta.link.reference.markdown" - }, - "link-ref-literal": { - "captures": { - "1": { - "name": "punctuation.definition.string.begin.markdown" - }, - "2": { - "name": "string.other.link.title.markdown" - }, - "4": { - "name": "punctuation.definition.string.end.markdown" - }, - "5": { - "name": "punctuation.definition.constant.begin.markdown" - }, - "6": { - "name": "punctuation.definition.constant.end.markdown" - } - }, - "match": "(\\[)((?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])*+)(\\])[ ]?(\\[)(\\])", - "name": "meta.link.reference.literal.markdown" - }, - "link-ref-shortcut": { - "captures": { - "1": { - "name": "punctuation.definition.string.begin.markdown" - }, - "2": { - "name": "string.other.link.title.markdown" - }, - "3": { - "name": "punctuation.definition.string.end.markdown" - } - }, - "match": "(\\[)(\\S+?)(\\])", - "name": "meta.link.reference.markdown" - }, - "raw": { - "captures": { - "1": { - "name": "punctuation.definition.raw.markdown" - }, - "3": { - "name": "punctuation.definition.raw.markdown" - } - }, - "match": "(`+)([^`]|(?!(?<!`)\\1(?!`))`)*+(\\1)", - "name": "markup.inline.raw.string.markdown" - } - } -} diff --git a/tools/vscode/syntaxes/astro.tmLanguage.json b/tools/vscode/syntaxes/astro.tmLanguage.json deleted file mode 100644 index 8100fbe03245..000000000000 --- a/tools/vscode/syntaxes/astro.tmLanguage.json +++ /dev/null @@ -1,774 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", - "fileTypes": ["astro"], - "foldingStartMarker": "(?x)\n(<(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|li|form|dl)\\b.*?>\n|<!--(?!.*--\\s*>)\n|^<!--\\ \\#tminclude\\ (?>.*?-->)$\n|<\\?(?:php)?.*\\b(if|for(each)?|while)\\b.+:\n|\\{\\{?(if|foreach|capture|literal|foreach|php|section|strip)\n|\\{\\s*($|\\?>\\s*$|//|/\\*(.*\\*/\\s*$|(?!.*?\\*/)))\n)", - "foldingStopMarker": "(?x)\n(</(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|li|form|dl)>\n|^(?!.*?<!--).*?--\\s*>\n|^<!--\\ end\\ tminclude\\ -->$\n|<\\?(?:php)?.*\\bend(if|for(each)?|while)\\b\n|\\{\\{?/(if|foreach|capture|literal|foreach|php|section|strip)\n|^[^{]*\\}\n)", - "keyEquivalent": "^~H", - "name": "Astro", - "scopeName": "text.html.astro", - "patterns": [ - { - "include": "#astro-markdown" - }, - { - "include": "#astro-expressions" - }, - { - "begin": "(<)([a-zA-Z0-9:-]++)(?=[^>]*></\\2>)", - "beginCaptures": { - "1": { - "name": "punctuation.definition.tag.begin.html" - }, - "2": { - "name": "entity.name.tag.html" - } - }, - "end": "(>)(<)(/)(\\2)(>)", - "endCaptures": { - "1": { - "name": "punctuation.definition.tag.end.html" - }, - "2": { - "name": "punctuation.definition.tag.begin.html meta.scope.between-tag-pair.html" - }, - "3": { - "name": "punctuation.definition.tag.begin.html" - }, - "4": { - "name": "entity.name.tag.html" - }, - "5": { - "name": "punctuation.definition.tag.end.html" - } - }, - "name": "meta.tag.any.html", - "patterns": [ - { - "include": "#tag-stuff" - } - ] - }, - { - "begin": "(<\\?)(xml)", - "captures": { - "1": { - "name": "punctuation.definition.tag.html" - }, - "2": { - "name": "entity.name.tag.xml.html" - } - }, - "end": "(\\?>)", - "name": "meta.tag.preprocessor.xml.html", - "patterns": [ - { - "include": "#tag-generic-attribute" - }, - { - "include": "#string-double-quoted" - }, - { - "include": "#string-single-quoted" - } - ] - }, - { - "begin": "<!--", - "captures": { - "0": { - "name": "punctuation.definition.comment.html" - } - }, - "end": "--\\s*>", - "name": "comment.block.html", - "patterns": [ - { - "match": "--", - "name": "invalid.illegal.bad-comments-or-CDATA.html" - } - ] - }, - { - "begin": "<!", - "captures": { - "0": { - "name": "punctuation.definition.tag.html" - } - }, - "end": ">", - "name": "meta.tag.sgml.html", - "patterns": [ - { - "begin": "(?i:DOCTYPE|doctype)", - "captures": { - "1": { - "name": "entity.name.tag.doctype.html" - } - }, - "end": "(?=>)", - "name": "meta.tag.sgml.doctype.html", - "patterns": [ - { - "match": "\"[^\">]*\"", - "name": "string.quoted.double.doctype.identifiers-and-DTDs.html" - } - ] - }, - { - "begin": "\\[CDATA\\[", - "end": "]](?=>)", - "name": "constant.other.inline-data.html" - }, - { - "match": "(\\s*)(?!--|>)\\S(\\s*)", - "name": "invalid.illegal.bad-comments-or-CDATA.html" - } - ] - }, - { - "begin": "(?:^\\s+)?(<)((?i:style))\\b(?=[^>]*lang=(['\"])css\\1?)", - "captures": { - "1": { - "name": "punctuation.definition.tag.begin.html" - }, - "2": { - "name": "entity.name.tag.style.html" - }, - "3": { - "name": "punctuation.definition.tag.html" - } - }, - "end": "(</)((?i:style))(>)(?:\\s*\\n)?", - "name": "source.css.embedded.html", - "patterns": [ - { - "include": "#tag-stuff" - }, - { - "begin": "(>)", - "beginCaptures": { - "1": { - "name": "punctuation.definition.tag.end.html" - } - }, - "end": "(?=</(?i:style))", - "patterns": [ - { - "include": "source.css" - } - ] - } - ] - }, - { - "begin": "(?:^\\s+)?(<)((?i:style))\\b(?=[^>]*lang=(['\"])sass\\1?)", - "captures": { - "1": { - "name": "punctuation.definition.tag.begin.html" - }, - "2": { - "name": "entity.name.tag.style.html" - }, - "3": { - "name": "punctuation.definition.tag.html" - } - }, - "end": "(</)((?i:style))(>)(?:\\s*\\n)?", - "name": "source.sass.embedded.html", - "patterns": [ - { - "include": "#tag-stuff" - }, - { - "begin": "(>)", - "beginCaptures": { - "1": { - "name": "punctuation.definition.tag.end.html" - } - }, - "end": "(?=</(?i:style))", - "patterns": [ - { - "include": "source.sass" - } - ] - } - ] - }, - { - "begin": "(?:^\\s+)?(<)((?i:style))\\b(?=[^>]*lang=(['\"])scss\\1?)", - "captures": { - "1": { - "name": "punctuation.definition.tag.begin.html" - }, - "2": { - "name": "entity.name.tag.style.html" - }, - "3": { - "name": "punctuation.definition.tag.html" - } - }, - "end": "(</)((?i:style))(>)(?:\\s*\\n)?", - "name": "source.scss.embedded.html", - "patterns": [ - { - "include": "#tag-stuff" - }, - { - "begin": "(>)", - "beginCaptures": { - "1": { - "name": "punctuation.definition.tag.end.html" - } - }, - "end": "(?=</(?i:style))", - "patterns": [ - { - "include": "source.css.scss" - } - ] - } - ] - }, - { - "begin": "(?:^\\s+)?(<)((?i:style))\\b(?![^>]*/>)", - "captures": { - "1": { - "name": "punctuation.definition.tag.begin.html" - }, - "2": { - "name": "entity.name.tag.style.html" - }, - "3": { - "name": "punctuation.definition.tag.html" - } - }, - "end": "(</)((?i:style))(>)(?:\\s*\\n)?", - "__DEFAULT_STYLE_NAME_START__": null, - "name": "source.css.embedded.html", - "__DEFAULT_STYLE_NAME_END__": null, - "patterns": [ - { - "include": "#tag-stuff" - }, - { - "begin": "(>)", - "beginCaptures": { - "1": { - "name": "punctuation.definition.tag.end.html" - } - }, - "end": "(?=</(?i:style))", - "patterns": [ - { - "__DEFAULT_STYLE_INCLUDE_START__": null, - "include": "source.css", - "__DEFAULT_STYLE_INCLUDE_END__": null - } - ] - } - ] - }, - { - "begin": "(?:^\\s+)?(<)((?i:script))\\b(?=[^>]*lang=(['\"])tsx\\1?)", - "beginCaptures": { - "1": { - "name": "punctuation.definition.tag.begin.html" - }, - "2": { - "name": "entity.name.tag.script.html" - } - }, - "end": "(?<=</(script|SCRIPT))(>)(?:\\s*\\n)?", - "endCaptures": { - "2": { - "name": "punctuation.definition.tag.html" - } - }, - "name": "source.tsx.embedded.html", - "patterns": [ - { - "include": "#tag-stuff" - }, - { - "begin": "(?<!</(?:script|SCRIPT))(>)", - "captures": { - "1": { - "name": "punctuation.definition.tag.begin.html" - }, - "2": { - "name": "entity.name.tag.script.html" - } - }, - "end": "(</)((?i:script))", - "patterns": [ - { - "include": "source.tsx" - } - ] - } - ] - }, - { - "begin": "(?:^\\s+)?(<)((?i:script))\\b(?=[^>]*lang=(['\"])ts\\1?)", - "beginCaptures": { - "1": { - "name": "punctuation.definition.tag.begin.html" - }, - "2": { - "name": "entity.name.tag.script.html" - } - }, - "end": "(?<=</(script|SCRIPT))(>)(?:\\s*\\n)?", - "endCaptures": { - "2": { - "name": "punctuation.definition.tag.html" - } - }, - "name": "source.tsx.embedded.html", - "patterns": [ - { - "include": "#tag-stuff" - }, - { - "begin": "(?<!</(?:script|SCRIPT))(>)", - "captures": { - "1": { - "name": "punctuation.definition.tag.begin.html" - }, - "2": { - "name": "entity.name.tag.script.html" - } - }, - "end": "(</)((?i:script))", - "patterns": [ - { - "include": "source.tsx" - } - ] - } - ] - }, - { - "begin": "(<)((?i:script))\\b(?![^>]*/>)(?![^>]*(?i:type.?=.?text/((?!javascript|babel|ecmascript).*)))", - "beginCaptures": { - "1": { - "name": "punctuation.definition.tag.begin.html" - }, - "2": { - "name": "entity.name.tag.script.html" - } - }, - "end": "(?<=</(script|SCRIPT))(>)(?:\\s*\\n)?", - "endCaptures": { - "2": { - "name": "punctuation.definition.tag.html" - } - }, - "name": "source.tsx.embedded.html", - "patterns": [ - { - "include": "#tag-stuff" - }, - { - "begin": "(?<!</(?:script|SCRIPT))(>)", - "captures": { - "1": { - "name": "punctuation.definition.tag.begin.html" - }, - "2": { - "name": "entity.name.tag.script.html" - } - }, - "end": "(</)((?i:script))", - "patterns": [ - { - "captures": { - "1": { - "name": "punctuation.definition.comment.js" - } - }, - "match": "(//).*?((?=</script)|$\\n?)", - "name": "comment.line.double-slash.js" - }, - { - "begin": "/\\*", - "captures": { - "0": { - "name": "punctuation.definition.comment.js" - } - }, - "end": "\\*/|(?=</script)", - "name": "comment.block.js" - }, - { - "include": "source.tsx" - } - ] - } - ] - }, - { - "begin": "(</?)((?i:body|head|html)\\b)", - "captures": { - "1": { - "name": "punctuation.definition.tag.begin.html" - }, - "2": { - "name": "entity.name.tag.structure.any.html" - } - }, - "end": "(>)", - "endCaptures": { - "1": { - "name": "punctuation.definition.tag.end.html" - } - }, - "name": "meta.tag.structure.any.html", - "patterns": [ - { - "include": "#tag-stuff" - } - ] - }, - { - "begin": "(</?)((?i:address|blockquote|dd|div|dl|dt|fieldset|form|frame|frameset|h1|h2|h3|h4|h5|h6|iframe|noframes|object|ol|p|ul|applet|center|dir|hr|menu|pre)\\b)", - "beginCaptures": { - "1": { - "name": "punctuation.definition.tag.begin.html" - }, - "2": { - "name": "entity.name.tag.block.any.html" - } - }, - "end": "(>)", - "endCaptures": { - "1": { - "name": "punctuation.definition.tag.end.html" - } - }, - "name": "meta.tag.block.any.html", - "patterns": [ - { - "include": "#tag-stuff" - } - ] - }, - { - "begin": "(</?)((?i:a|abbr|acronym|area|b|base|basefont|bdo|big|br|button|caption|cite|code|col|colgroup|del|dfn|em|font|head|html|i|img|input|ins|isindex|kbd|label|legend|li|link|map|meta|noscript|optgroup|option|param|q|s|samp|script|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|var)\\b)", - "beginCaptures": { - "1": { - "name": "punctuation.definition.tag.begin.html" - }, - "2": { - "name": "entity.name.tag.inline.any.html" - } - }, - "end": "((?: ?/)?>)", - "endCaptures": { - "1": { - "name": "punctuation.definition.tag.end.html" - } - }, - "name": "meta.tag.inline.any.html", - "patterns": [ - { - "include": "#tag-stuff" - } - ] - }, - { - "begin": "(</?)([A-Z][a-zA-Z0-9-\\.]*|[a-z]+\\.[a-zA-Z0-9-]+)(\\:(load|idle|visible))?", - "beginCaptures": { - "1": { - "name": "punctuation.definition.tag.begin.html" - }, - "2": { - "name": "entity.name.tag.component.astro" - }, - "3": { - "name": "keyword.control.loading.astro" - } - }, - "end": "(/?>)", - "endCaptures": { - "1": { - "name": "punctuation.definition.tag.end.html" - } - }, - "name": "meta.tag.component.astro", - "patterns": [ - { - "include": "#tag-stuff" - } - ] - }, - { - "begin": "(</?)([a-zA-Z0-9:-]+)", - "beginCaptures": { - "1": { - "name": "punctuation.definition.tag.begin.html" - }, - "2": { - "name": "entity.name.tag.other.html" - } - }, - "end": "(/?>)", - "endCaptures": { - "1": { - "name": "punctuation.definition.tag.end.html" - } - }, - "name": "meta.tag.other.html", - "patterns": [ - { - "include": "#tag-stuff" - } - ] - }, - { - "include": "#entities" - }, - { - "include": "#frontmatter" - }, - { - "match": "<>", - "name": "invalid.illegal.incomplete.html" - }, - { - "match": "<", - "name": "invalid.illegal.bad-angle-bracket.html" - } - ], - "repository": { - "frontmatter": { - "begin": "\\A(-{3})\\s*$", - "beginCaptures": { - "1": { - "name": "comment.block.html" - } - }, - "contentName": "meta.embedded.block.frontmatter", - "patterns": [ - { - "include": "source.tsx" - } - ], - "end": "(^|\\G)(-{3})|\\.{3}\\s*$", - "endCaptures": { - "2": { - "name": "comment.block.html" - } - } - }, - "entities": { - "patterns": [ - { - "captures": { - "1": { - "name": "punctuation.definition.entity.html" - }, - "3": { - "name": "punctuation.definition.entity.html" - } - }, - "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)", - "name": "constant.character.entity.html" - }, - { - "match": "&", - "name": "invalid.illegal.bad-ampersand.html" - } - ] - }, - "string-double-quoted": { - "begin": "\"", - "beginCaptures": { - "0": { - "name": "punctuation.definition.string.begin.html" - } - }, - "end": "\"", - "endCaptures": { - "0": { - "name": "punctuation.definition.string.end.html" - } - }, - "name": "string.quoted.double.html", - "patterns": [ - { - "include": "#entities" - } - ] - }, - "string-single-quoted": { - "begin": "'", - "beginCaptures": { - "0": { - "name": "punctuation.definition.string.begin.html" - } - }, - "end": "'", - "endCaptures": { - "0": { - "name": "punctuation.definition.string.end.html" - } - }, - "name": "string.quoted.single.html", - "patterns": [ - { - "include": "#entities" - } - ] - }, - "tag-generic-attribute": { - "match": "\\b([a-zA-Z\\-:]+)", - "name": "entity.other.attribute-name.html" - }, - "tag-id-attribute": { - "begin": "\\b(id)\\b\\s*(=)", - "captures": { - "1": { - "name": "entity.other.attribute-name.id.html" - }, - "2": { - "name": "punctuation.separator.key-value.html" - } - }, - "end": "(?<='|\")", - "name": "meta.attribute-with-value.id.html", - "patterns": [ - { - "begin": "\"", - "beginCaptures": { - "0": { - "name": "punctuation.definition.string.begin.html" - } - }, - "contentName": "meta.toc-list.id.html", - "end": "\"", - "endCaptures": { - "0": { - "name": "punctuation.definition.string.end.html" - } - }, - "name": "string.quoted.double.html", - "patterns": [ - { - "include": "#astro-expressions" - }, - { - "include": "#entities" - } - ] - }, - { - "begin": "'", - "beginCaptures": { - "0": { - "name": "punctuation.definition.string.begin.html" - } - }, - "contentName": "meta.toc-list.id.html", - "end": "'", - "endCaptures": { - "0": { - "name": "punctuation.definition.string.end.html" - } - }, - "name": "string.quoted.single.html", - "patterns": [ - { - "include": "#astro-expressions" - }, - { - "include": "#entities" - } - ] - } - ] - }, - "tag-stuff": { - "patterns": [ - { - "include": "#tag-id-attribute" - }, - { - "include": "#tag-generic-attribute" - }, - { - "include": "#string-double-quoted" - }, - { - "include": "#string-single-quoted" - }, - { - "include": "#astro-load-directive" - }, - { - "include": "#astro-expressions" - }, - { - "include": "#astro-markdown" - } - ] - }, - "astro-markdown": { - "name": "text.html.astro.markdown", - "begin": "(<)(Markdown)(>)", - "beginCaptures": { - "1": { - "name": "punctuation.definition.tag.begin.html" - }, - "2": { - "name": "entity.name.tag.html" - }, - "3": { - "name": "punctuation.definition.tag.end.html" - } - }, - "end": "(</)(Markdown)(>)", - "endCaptures": { - "1": { - "name": "punctuation.definition.tag.begin.html" - }, - "2": { - "name": "entity.name.tag.html" - }, - "3": { - "name": "punctuation.definition.tag.end.html" - } - }, - "patterns": [ - { - "include": "text.html.markdown.astro" - } - ] - }, - "astro-expressions": { - "patterns": [ - { - "begin": "\\{", - "beginCaptures": { - "0": { - "name": "punctuation.definition.generic.begin.html" - } - }, - "end": "\\}", - "endCaptures": { - "0": { - "name": "punctuation.definition.generic.end.html" - } - }, - "name": "expression.embbeded.astro", - "patterns": [ - { - "include": "source.tsx" - } - ] - } - ] - } - } -} From 30d0fcedbb67c635572170c0df04efc4ef31c26d Mon Sep 17 00:00:00 2001 From: Rafid Muhymin Wafi <rafidmuhymin@gmail.com> Date: Tue, 29 Mar 2022 04:05:40 +0600 Subject: [PATCH 7/9] Corrected package name in warning message (#2911) * fixed typo in warning message * added missing type --- packages/astro/src/core/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/astro/src/core/config.ts b/packages/astro/src/core/config.ts index a675252f1e5c..0f79df501e07 100644 --- a/packages/astro/src/core/config.ts +++ b/packages/astro/src/core/config.ts @@ -140,7 +140,7 @@ export async function validateConfig(userConfig: any, root: string): Promise<Ast console.error('Update your configuration and install new dependencies:'); try { const rendererKeywords = userConfig.renderers.map((r: string) => r.replace('@astrojs/renderer-', '')); - const rendererImports = rendererKeywords.map((r: string) => ` import ${r} from '@astrojs/${r}';`).join('\n'); + const rendererImports = rendererKeywords.map((r: string) => ` import ${r} from '@astrojs/${r === "solid" ? "solid-js" : r}';`).join("\n"); const rendererIntegrations = rendererKeywords.map((r: string) => ` ${r}(),`).join('\n'); console.error(''); console.error(colors.dim(' // astro.config.js')); From 9b7e419989ade6a3437ef4b077c7593f522f0b20 Mon Sep 17 00:00:00 2001 From: natemoo-re <natemoo-re@users.noreply.github.com> Date: Mon, 28 Mar 2022 22:06:23 +0000 Subject: [PATCH 8/9] [ci] format --- packages/astro/src/core/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/astro/src/core/config.ts b/packages/astro/src/core/config.ts index 0f79df501e07..39fa44174b17 100644 --- a/packages/astro/src/core/config.ts +++ b/packages/astro/src/core/config.ts @@ -140,7 +140,7 @@ export async function validateConfig(userConfig: any, root: string): Promise<Ast console.error('Update your configuration and install new dependencies:'); try { const rendererKeywords = userConfig.renderers.map((r: string) => r.replace('@astrojs/renderer-', '')); - const rendererImports = rendererKeywords.map((r: string) => ` import ${r} from '@astrojs/${r === "solid" ? "solid-js" : r}';`).join("\n"); + const rendererImports = rendererKeywords.map((r: string) => ` import ${r} from '@astrojs/${r === 'solid' ? 'solid-js' : r}';`).join('\n'); const rendererIntegrations = rendererKeywords.map((r: string) => ` ${r}(),`).join('\n'); console.error(''); console.error(colors.dim(' // astro.config.js')); From 22b1432e3eed6ff40a0ab383c8f1f06f0df10d62 Mon Sep 17 00:00:00 2001 From: Chris Swithinbank <swithinbank@gmail.com> Date: Tue, 29 Mar 2022 00:07:07 +0200 Subject: [PATCH 9/9] Fix typing of `integrations` array in user config (#2907) * Fix type of `integrations` in config As per [docs](https://docs.astro.build/en/reference/integrations-reference/#combining-plugins), an integration can return an array of `AstroIntegration` objects to support bundling a collection of integrations as a preset. This change reflects that usages in the typing for the user config object. * Add changeset --- .changeset/real-starfishes-turn.md | 5 +++++ packages/astro/src/@types/astro.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/real-starfishes-turn.md diff --git a/.changeset/real-starfishes-turn.md b/.changeset/real-starfishes-turn.md new file mode 100644 index 000000000000..bccddb3febb7 --- /dev/null +++ b/.changeset/real-starfishes-turn.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fix typing of `integrations` array in user config diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts index 70969f7ec330..6e3638e524ee 100644 --- a/packages/astro/src/@types/astro.ts +++ b/packages/astro/src/@types/astro.ts @@ -161,7 +161,7 @@ export interface AstroUserConfig { * } * ``` */ - integrations?: AstroIntegration[]; + integrations?: Array<AstroIntegration | AstroIntegration[]>; /** * @docs