diff options
47 files changed, 217 insertions, 3619 deletions
diff --git a/.changeset/real-starfishes-turn.md b/.changeset/real-starfishes-turn.md new file mode 100644 index 000000000..bccddb3fe --- /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/examples/blog-multiple-authors/package.json b/examples/blog-multiple-authors/package.json index a4fe9ae2a..26a149981 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 6ec109958..2aa6de6fb 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 fbac5dabc..a327d59cf 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 d1e046117..665cd0667 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 b3d46d8b4..3529de1c7 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 98c46b1fa..1d934f60e 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 df93e5aaa..89ce3a5d9 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 0ddf30351..d2c789019 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 56aee2241..cf7162a5e 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 9ef56e4f2..1f10b5bc2 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 6670cefda..030c7fc88 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 a23efdc99..a75ca71b1 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 7b87d3dc6..942099309 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 fefbf95a8..ecd829b5e 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 e1bfe0a32..ada918853 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 434f6c7a8..cecbf5c5f 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 5e68a70a9..6cbfb1568 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 f666b225a..35bdca866 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 283bcf296..884a18a54 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 ff451d99d..0fff1a509 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 5135d73b7..cc4c33c3c 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 78bb78e2e..52495596a 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 bd7b55130..c1feb2baa 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 990cc34f8..3f2e894a3 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 291bd5a73..5bfc50268 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 071703164..8b48d6084 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 8fd4c2cf5..47051bf98 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 8acbd6eef..b106e3fa4 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 diff --git a/packages/astro/package.json b/packages/astro/package.json index a6f507326..d42143865 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/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts index c3425cbf6..a224062b1 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 diff --git a/packages/astro/src/core/build/internal.ts b/packages/astro/src/core/build/internal.ts index c436b9c5c..674a657b6 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 1a4cf16e4..afb2a5393 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<RollupOutput | }), rollupPluginAstroBuildCSS({ internals, + legacy: true, }), ...(viteConfig.plugins || []), ], diff --git a/packages/astro/src/core/build/static-build.ts b/packages/astro/src/core/build/static-build.ts index 2e54891d3..f5e54b7bf 100644 --- a/packages/astro/src/core/build/static-build.ts +++ b/packages/astro/src/core/build/static-build.ts @@ -132,7 +132,6 @@ async function ssrBuild(opts: StaticBuildOptions, internals: BuildInternals, inp entryFileNames: opts.buildConfig.serverEntry, chunkFileNames: 'chunks/chunk.[hash].mjs', assetFileNames: 'assets/asset.[hash][extname]', - inlineDynamicImports: true, }, }, // must match an esbuild target @@ -147,6 +146,7 @@ async function ssrBuild(opts: StaticBuildOptions, internals: BuildInternals, inp vitePluginPages(opts, internals), rollupPluginAstroBuildCSS({ internals, + legacy: false, }), ...(viteConfig.plugins || []), // SSR needs to be last @@ -200,6 +200,7 @@ async function clientBuild(opts: StaticBuildOptions, internals: BuildInternals, vitePluginHoistedScripts(astroConfig, internals), rollupPluginAstroBuildCSS({ internals, + legacy: false, }), ...(viteConfig.plugins || []), ], diff --git a/packages/astro/src/core/build/vite-plugin-pages.ts b/packages/astro/src/core/build/vite-plugin-pages.ts index 22991c8ae..ea7fe1600 100644 --- a/packages/astro/src/core/build/vite-plugin-pages.ts +++ b/packages/astro/src/core/build/vite-plugin-pages.ts @@ -6,7 +6,7 @@ import { eachPageData } from './internal.js'; import { isBuildingToSSR } from '../util.js'; export const virtualModuleId = '@astrojs-pages-virtual-entry'; -const resolvedVirtualModuleId = '\0' + virtualModuleId; +export const resolvedVirtualModuleId = '\0' + virtualModuleId; export function vitePluginPages(opts: StaticBuildOptions, internals: BuildInternals): VitePlugin { return { diff --git a/packages/astro/src/core/config.ts b/packages/astro/src/core/config.ts index f2d3b6d91..07f56f21e 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')); diff --git a/packages/astro/src/vite-plugin-build-css/index.ts b/packages/astro/src/vite-plugin-build-css/index.ts index 7de50af4e..24101516e 100644 --- a/packages/astro/src/vite-plugin-build-css/index.ts +++ b/packages/astro/src/vite-plugin-build-css/index.ts @@ -1,10 +1,12 @@ -import type { BuildInternals } from '../core/build/internal'; +import { BuildInternals } from '../core/build/internal'; +import type { ModuleInfo, PluginContext } from 'rollup'; import * as path from 'path'; import esbuild from 'esbuild'; import { Plugin as VitePlugin } from 'vite'; import { isCSSRequest } from '../core/render/dev/css.js'; -import { getPageDatasByChunk } from '../core/build/internal.js'; +import { getPageDatasByChunk, getPageDataByViteID, hasPageDataByViteID } from '../core/build/internal.js'; +import { resolvedVirtualModuleId as virtualPagesModuleId } from '../core/build/vite-plugin-pages.js'; const PLUGIN_NAME = '@astrojs/rollup-plugin-build-css'; @@ -44,12 +46,64 @@ function isPageStyleVirtualModule(id: string) { interface PluginOptions { internals: BuildInternals; + legacy: boolean; } export function rollupPluginAstroBuildCSS(options: PluginOptions): VitePlugin { - const { internals } = options; + const { internals, legacy } = options; const styleSourceMap = new Map<string, string>(); + function* walkStyles(ctx: PluginContext, id: string, seen = new Set<string>()): 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 000000000..f900a1e88 --- /dev/null +++ b/packages/astro/test/fixtures/page-level-styles/src/layouts/Base.astro @@ -0,0 +1,13 @@ +--- + +--- +<html lang="en"> + <head> + <meta charset="utf-8" /> + <meta name="viewport" content="width=device-width" /> + <title>Astro</title> + </head> + <body> + <slot /> + </body> +</html> 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 000000000..e32ade457 --- /dev/null +++ b/packages/astro/test/fixtures/page-level-styles/src/layouts/Styled.astro @@ -0,0 +1,13 @@ +--- +import "../styles/main.css"; +--- +<html lang="en"> + <head> + <meta charset="utf-8" /> + <meta name="viewport" content="width=device-width" /> + <title>Astro</title> + </head> + <body> + <slot /> + </body> +</html> 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 000000000..de9f896a9 --- /dev/null +++ b/packages/astro/test/fixtures/page-level-styles/src/pages/blog.astro @@ -0,0 +1,9 @@ +--- +import Layout from '../layouts/Styled.astro' +--- + +<Layout> + <h1>Astro (with main.css)</h1> + <p>This should have custom styles (white text on black background)</p> + <a href="/">Home (without main.css)</a> +</Layout> 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 000000000..d4ae35676 --- /dev/null +++ b/packages/astro/test/fixtures/page-level-styles/src/pages/index.astro @@ -0,0 +1,9 @@ +--- +import Layout from '../layouts/Base.astro' +--- + +<Layout> + <h1>Astro (without main.css)</h1> + <p>This should have default styles (white text on black background)</p> + <a href="/blog">Blog (with main.css)</a> +</Layout> 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 000000000..1bee9c028 --- /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 000000000..6b3fb5dac --- /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); + }); +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8fbf184ef..075679e07 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: diff --git a/scripts/stats/stats.csv b/scripts/stats/stats.csv index 8437b826b..1ff8ca327 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" diff --git a/tools/vscode/syntaxes/astro-markdown.tmLanguage.json b/tools/vscode/syntaxes/astro-markdown.tmLanguage.json deleted file mode 100644 index be230cc62..000000000 --- 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*(<!--)", - "captures": { - "1": { - "name": "punctuation.definition.comment.html" - }, - "2": { - "name": "punctuation.definition.comment.html" - } - }, - "end": "(-->)", - "name": "comment.block.html" - }, - { - "begin": "(?i)(?=</?[a-zA-Z]+[^\\s/>]*(\\s|$|/?>))", - "while": "(?i)^(?!.*</(\\1||\\2)>)", - "patterns": [ - { - "include": "text.html.astro" - } - ] - }, - { - "begin": "(?=(<[a-zA-Z0-9\\-](/?>|\\s.*?>)|</[a-zA-Z0-9\\-]>)\\s*$)", - "patterns": [ - { - "include": "text.html.astro" - } - ], - "while": "(?i)^(?!.*</(\\1||\\2)>)" - } - ] - }, - "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 (<?)(\\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.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) (?<open>(\\*\\*(?=\\w)|(?<!\\w)\\*\\*|(?<!\\w)\\b__))(?=\\S) (?=\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 whitespace\n <?(.*?)>? # URL\n [ \\t]*+ # Optional whitespace\n ( # Optional Title\n (?<title>['\"])\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 8100fbe03..000000000 --- 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" - } - ] - } - ] - } - } -} |