{
	"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
	"name": "sdoc",
	"scopeName": "source.sdoc",
	"fileTypes": [
		"sdoc"
	],
	"injections": {
		"L:meta.embedded.block.markdown - (markup.fenced_code.block.markdown, markup.inline.raw.string.markdown, meta.template.block.sdoc)": {
			"patterns": [
				{
					"include": "#page-svelte-tag"
				},
				{
					"include": "#page-svelte-expression"
				}
			]
		},
		"L:meta.tag.start.svelte - (string, comment, meta.embedded)": {
			"comment": "CSS-custom-property component props (--background=\"…\" / --x={…}) color like their sibling attributes instead of Svelte's property-name scope — visual parity inside .sdoc bodies. The whole attribute is consumed atomically so the value keeps its own scopes.",
			"patterns": [
				{
					"match": "(--[\\w-]+)(=)(\")((?:[^\"\\\\]|\\\\.)*)(\")",
					"captures": {
						"1": {
							"name": "entity.other.attribute-name.sdoc"
						},
						"2": {
							"name": "punctuation.separator.key-value.sdoc"
						},
						"3": {
							"name": "punctuation.definition.string.begin.sdoc"
						},
						"4": {
							"name": "string.quoted.double.sdoc"
						},
						"5": {
							"name": "punctuation.definition.string.end.sdoc"
						}
					}
				},
				{
					"match": "(--[\\w-]+)(=)(\\{)((?:[^{}]|\\{[^{}]*\\})*)(\\})",
					"captures": {
						"1": {
							"name": "entity.other.attribute-name.sdoc"
						},
						"2": {
							"name": "punctuation.separator.key-value.sdoc"
						},
						"3": {
							"name": "punctuation.section.embedded.begin.sdoc"
						},
						"4": {
							"patterns": [
								{
									"include": "source.ts"
								}
							]
						},
						"5": {
							"name": "punctuation.section.embedded.end.sdoc"
						}
					}
				}
			]
		}
	},
	"patterns": [
		{
			"include": "#comment"
		},
		{
			"include": "#script-ts"
		},
		{
			"include": "#script-js"
		},
		{
			"include": "#style"
		},
		{
			"include": "#docs"
		},
		{
			"include": "#doc"
		},
		{
			"include": "#page"
		},
		{
			"include": "#layout"
		},
		{
			"include": "#patterns"
		}
	],
	"repository": {
		"comment": {
			"name": "comment.block.html.sdoc",
			"begin": "<!--",
			"end": "-->"
		},
		"script-ts": {
			"begin": "^\\s*(<)(script)(?=[\\s/>])((?=[^>]*lang=([\"'])ts\\4)[^>]*)(>)",
			"beginCaptures": {
				"1": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"2": {
					"name": "entity.name.tag.script.sdoc"
				},
				"3": {
					"patterns": [
						{
							"include": "#tag-attributes"
						}
					]
				},
				"5": {
					"name": "punctuation.definition.tag.end.sdoc"
				}
			},
			"end": "(</)(script)\\s*(>)",
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"2": {
					"name": "entity.name.tag.script.sdoc"
				},
				"3": {
					"name": "punctuation.definition.tag.end.sdoc"
				}
			},
			"contentName": "source.ts",
			"patterns": [
				{
					"include": "source.ts"
				}
			]
		},
		"script-js": {
			"begin": "^\\s*(<)(script)(?=[\\s/>])((?![^>]*lang=([\"'])ts\\4)[^>]*)(>)",
			"beginCaptures": {
				"1": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"2": {
					"name": "entity.name.tag.script.sdoc"
				},
				"3": {
					"patterns": [
						{
							"include": "#tag-attributes"
						}
					]
				},
				"5": {
					"name": "punctuation.definition.tag.end.sdoc"
				}
			},
			"end": "(</)(script)\\s*(>)",
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"2": {
					"name": "entity.name.tag.script.sdoc"
				},
				"3": {
					"name": "punctuation.definition.tag.end.sdoc"
				}
			},
			"contentName": "source.js",
			"patterns": [
				{
					"include": "source.js"
				}
			]
		},
		"style": {
			"begin": "^\\s*(<)(style)(?=[\\s/>])([^>]*)(>)",
			"beginCaptures": {
				"1": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"2": {
					"name": "entity.name.tag.style.sdoc"
				},
				"3": {
					"patterns": [
						{
							"include": "#tag-attributes"
						}
					]
				},
				"4": {
					"name": "punctuation.definition.tag.end.sdoc"
				}
			},
			"end": "(</)(style)\\s*(>)",
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"2": {
					"name": "entity.name.tag.style.sdoc"
				},
				"3": {
					"name": "punctuation.definition.tag.end.sdoc"
				}
			},
			"contentName": "source.css",
			"patterns": [
				{
					"include": "source.css"
				}
			]
		},
		"docs": {
			"name": "meta.block.docs.sdoc",
			"begin": "^\\s*(\\[)(SHOWCASE)\\b(.*)$",
			"beginCaptures": {
				"1": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"2": {
					"name": "keyword.control.entity.sdoc"
				},
				"3": {
					"patterns": [
						{
							"include": "#attributes"
						}
					]
				}
			},
			"end": "^\\s*(\\[/)(SHOWCASE)(\\])\\s*$",
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"2": {
					"name": "keyword.control.entity.sdoc"
				},
				"3": {
					"name": "punctuation.definition.tag.end.sdoc"
				}
			},
			"patterns": [
				{
					"include": "#comment"
				},
				{
					"include": "#opener-continuation"
				},
				{
					"include": "#block-script-ts"
				},
				{
					"include": "#block-script-js"
				},
				{
					"include": "#block-style"
				},
				{
					"include": "#components-container"
				},
				{
					"include": "#text-block"
				},
				{
					"include": "#prose"
				},
				{
					"include": "#glossary"
				},
				{
					"include": "#preview"
				},
				{
					"include": "#example"
				}
			]
		},
		"patterns": {
			"name": "meta.block.patterns.sdoc",
			"begin": "^\\s*(\\[)(PATTERNS)\\b(.*)$",
			"beginCaptures": {
				"1": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"2": {
					"name": "keyword.control.entity.sdoc"
				},
				"3": {
					"patterns": [
						{
							"include": "#attributes"
						}
					]
				}
			},
			"end": "^\\s*(\\[/)(PATTERNS)(\\])\\s*$",
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"2": {
					"name": "keyword.control.entity.sdoc"
				},
				"3": {
					"name": "punctuation.definition.tag.end.sdoc"
				}
			},
			"patterns": [
				{
					"include": "#comment"
				},
				{
					"include": "#opener-continuation"
				},
				{
					"include": "#block-script-ts"
				},
				{
					"include": "#block-script-js"
				},
				{
					"include": "#block-style"
				},
				{
					"include": "#components-container"
				},
				{
					"include": "#text-block"
				},
				{
					"include": "#prose"
				},
				{
					"include": "#glossary"
				},
				{
					"include": "#preview"
				},
				{
					"include": "#example"
				}
			]
		},
		"doc": {
			"name": "meta.block.doc.sdoc",
			"begin": "^\\s*(\\[)(DOC)\\b",
			"beginCaptures": {
				"1": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"2": {
					"name": "keyword.control.entity.sdoc"
				}
			},
			"end": "^\\s*(\\[/)(DOC)(\\])\\s*$",
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"2": {
					"name": "keyword.control.entity.sdoc"
				},
				"3": {
					"name": "punctuation.definition.tag.end.sdoc"
				}
			},
			"patterns": [
				{
					"comment": "The opener's attribute list, single-line or wrapped. \\G pins it to the tag that just matched, so it can only open here and never mid-body; it closes on the ]. The ^(?=\\s*\\[) alternative is the recovery hatch — a half-typed opener must not swallow the body or shield the entity end.",
					"begin": "\\G",
					"end": "(\\])|^(?=\\s*\\[)",
					"endCaptures": {
						"1": {
							"name": "punctuation.definition.tag.end.sdoc"
						}
					},
					"patterns": [
						{
							"include": "#attributes"
						}
					]
				},
				{
					"comment": "Fenced code and [example] regions are direct begin/end children of the DOC region, not children of the markdown while-loop below: a while condition is re-checked on every line no matter what is stacked above it, so a [/DOC] line inside a fence would pop the loop and let the DOC end match. The loop yields on fence-opener and [example] lines instead; begin/end children shield the DOC end until they close, so [/DOC] inside a fence stays fence content and [/example] still closes an example.",
					"include": "text.html.markdown#fenced_code_block"
				},
				{
					"include": "#text-block"
				},
				{
					"include": "#glossary"
				},
				{
					"include": "#page-example"
				},
				{
					"comment": "The begin consumes the same optional indent as the while: after a fence or example closes, the loop re-begins on the next content line, and a begin line skips the while — without the indent here markdown would see the raw tab and open an indented code block.",
					"begin": "(^|\\G)(?:\\t|[ ]{1,4})?",
					"while": "(^|\\G)(?!\\s*\\[/DOC\\]\\s*$)(?!\\s*(?:\\[(?i:example)\\b|\\[GLOSSARY\\b|\\[(?:NOTES|TODO)\\]\\s*$|`{3,}|~{3,}))(?:\\t|[ ]{1,4})?",
					"contentName": "meta.embedded.block.markdown",
					"patterns": [
						{
							"include": "#block-script-ts"
						},
						{
							"include": "#block-script-js"
						},
						{
							"include": "#block-style"
						},
						{
							"include": "#page-svelte-block"
						},
						{
							"include": "text.html.markdown"
						}
					]
				}
			]
		},
		"page": {
			"name": "meta.block.page.sdoc",
			"begin": "^\\s*(\\[)(PAGE)\\b",
			"beginCaptures": {
				"1": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"2": {
					"name": "keyword.control.entity.sdoc"
				}
			},
			"end": "^\\s*(\\[/)(PAGE)(\\])\\s*$",
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"2": {
					"name": "keyword.control.entity.sdoc"
				},
				"3": {
					"name": "punctuation.definition.tag.end.sdoc"
				}
			},
			"patterns": [
				{
					"comment": "The opener's attribute list, single-line or wrapped. \\G pins it to the tag that just matched, so it can only open here and never mid-body; it closes on the ]. The ^(?=\\s*\\[) alternative is the recovery hatch — a half-typed opener must not swallow the body or shield the entity end.",
					"begin": "\\G",
					"end": "(\\])|^(?=\\s*\\[)",
					"endCaptures": {
						"1": {
							"name": "punctuation.definition.tag.end.sdoc"
						}
					},
					"patterns": [
						{
							"include": "#attributes"
						}
					]
				},
				{
					"begin": "(^|\\G)",
					"while": "(^|\\G)(?!\\s*\\[/PAGE\\]\\s*$)",
					"patterns": [
						{
							"include": "#block-script-ts"
						},
						{
							"include": "#block-script-js"
						},
						{
							"include": "#block-style"
						},
						{
							"include": "source.svelte"
						}
					]
				}
			]
		},
		"page-svelte-block": {
			"name": "meta.template.block.sdoc",
			"begin": "(\\{#[a-zA-Z]+)([^}]*)(\\})",
			"beginCaptures": {
				"1": {
					"name": "keyword.control.svelte.sdoc"
				},
				"2": {
					"patterns": [
						{
							"include": "source.ts"
						}
					]
				},
				"3": {
					"name": "keyword.control.svelte.sdoc"
				}
			},
			"end": "(\\{/[a-zA-Z]+\\})",
			"endCaptures": {
				"1": {
					"name": "keyword.control.svelte.sdoc"
				}
			},
			"patterns": [
				{
					"include": "source.svelte"
				}
			]
		},
		"page-svelte-tag": {
			"name": "meta.template.block.sdoc",
			"begin": "(\\{)([@:][a-zA-Z]+)",
			"beginCaptures": {
				"1": {
					"name": "punctuation.definition.block.begin.sdoc"
				},
				"2": {
					"name": "keyword.control.svelte.sdoc"
				}
			},
			"end": "(\\})",
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.block.end.sdoc"
				}
			},
			"patterns": [
				{
					"include": "source.ts"
				}
			]
		},
		"page-svelte-expression": {
			"name": "meta.template.expression.sdoc",
			"begin": "(\\{)(?![#/@:\\s}])(?=[^{}]*\\})",
			"beginCaptures": {
				"1": {
					"name": "punctuation.definition.expression.begin.sdoc"
				}
			},
			"end": "(\\})",
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.expression.end.sdoc"
				}
			},
			"patterns": [
				{
					"include": "source.ts"
				}
			]
		},
		"layout": {
			"name": "meta.block.layout.sdoc",
			"begin": "^\\s*(\\[)(LAYOUT)\\b(.*)$",
			"beginCaptures": {
				"1": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"2": {
					"name": "keyword.control.entity.sdoc"
				},
				"3": {
					"patterns": [
						{
							"include": "#attributes"
						}
					]
				}
			},
			"end": "^\\s*(\\[/)(LAYOUT)(\\])\\s*$",
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"2": {
					"name": "keyword.control.entity.sdoc"
				},
				"3": {
					"name": "punctuation.definition.tag.end.sdoc"
				}
			},
			"patterns": [
				{
					"begin": "(^|\\G)",
					"while": "(^|\\G)(?!\\s*\\[/LAYOUT\\]\\s*$)",
					"patterns": [
						{
							"include": "#block-script-ts"
						},
						{
							"include": "#block-script-js"
						},
						{
							"include": "#block-style"
						},
						{
							"include": "#opener-continuation"
						},
						{
							"include": "source.svelte"
						}
					]
				}
			]
		},
		"preview": {
			"name": "meta.block.preview.sdoc",
			"begin": "^\\s*(\\[)((?i:component))\\b(.*)$",
			"beginCaptures": {
				"1": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"2": {
					"name": "entity.name.tag.sdoc"
				},
				"3": {
					"patterns": [
						{
							"include": "#attributes"
						}
					]
				}
			},
			"end": "^\\s*(\\[/)((?i:component))(\\])\\s*$",
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"2": {
					"name": "entity.name.tag.sdoc"
				},
				"3": {
					"name": "punctuation.definition.tag.end.sdoc"
				}
			},
			"patterns": [
				{
					"begin": "(^|\\G)",
					"while": "(^|\\G)(?!\\s*\\[/(?:(?i:component))\\]\\s*$)",
					"patterns": [
						{
							"include": "#opener-continuation"
						},
						{
							"include": "#block-script-ts"
						},
						{
							"include": "#block-script-js"
						},
						{
							"include": "#block-style"
						},
						{
							"include": "source.svelte"
						}
					]
				}
			]
		},
		"example": {
			"name": "meta.block.example.sdoc",
			"begin": "^\\s*(\\[)((?i:example))\\b(.*)$",
			"beginCaptures": {
				"1": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"2": {
					"name": "entity.name.tag.sdoc"
				},
				"3": {
					"patterns": [
						{
							"include": "#attributes"
						}
					]
				}
			},
			"end": "^\\s*(\\[/)((?i:example))(\\])\\s*$",
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"2": {
					"name": "entity.name.tag.sdoc"
				},
				"3": {
					"name": "punctuation.definition.tag.end.sdoc"
				}
			},
			"patterns": [
				{
					"include": "#text-block"
				},
				{
					"include": "#prose"
				},
				{
					"begin": "(^|\\G)",
					"while": "(^|\\G)(?!\\s*\\[(?:NOTES|TODO|PROSE)\\]\\s*$)(?!\\s*\\[/(?i:example)\\]\\s*$)",
					"patterns": [
						{
							"include": "#opener-continuation"
						},
						{
							"include": "#block-script-ts"
						},
						{
							"include": "#block-script-js"
						},
						{
							"include": "#block-style"
						},
						{
							"include": "source.svelte"
						}
					]
				}
			]
		},
		"opener-continuation": {
			"comment": "Attribute lines and the closing ] of a multi-line (wrapped) opener. Every rule is a single whole-line (^…$) match — no begin/end region — so nothing can span into the next line and desync a Svelte block body. The anchored shape also means Svelte text/script never matches.",
			"patterns": [
				{
					"comment": "Standalone closing ] of a multi-line opener.",
					"match": "^\\s*(\\])\\s*$",
					"captures": {
						"1": {
							"name": "punctuation.definition.tag.end.sdoc"
						}
					}
				},
				{
					"comment": "NAME=\"string\" | NAME={expression}, optionally followed by the closing ].",
					"match": "^\\s*([A-Za-z_][\\w-]*)\\s*(=)\\s*(\"(?:[^\"\\\\]|\\\\.)*\"|\\{(?:[^{}]|\\{[^{}]*\\})*\\})\\s*(\\])?\\s*$",
					"captures": {
						"1": {
							"name": "entity.other.attribute-name.sdoc"
						},
						"2": {
							"name": "punctuation.separator.key-value.sdoc"
						},
						"3": {
							"patterns": [
								{
									"match": "\"(?:[^\"\\\\]|\\\\.)*\"",
									"name": "string.quoted.double.sdoc"
								},
								{
									"match": "(\\{)((?:[^{}]|\\{[^{}]*\\})*)(\\})",
									"captures": {
										"1": {
											"name": "punctuation.section.embedded.begin.sdoc"
										},
										"2": {
											"patterns": [
												{
													"include": "source.ts"
												}
											]
										},
										"3": {
											"name": "punctuation.section.embedded.end.sdoc"
										}
									}
								}
							]
						},
						"4": {
							"name": "punctuation.definition.tag.end.sdoc"
						}
					}
				},
				{
					"comment": "A bare flag attribute alone on its line, optionally followed by the closing ].",
					"match": "^\\s*([A-Za-z_][\\w-]*)\\s*(\\])?\\s*$",
					"captures": {
						"1": {
							"name": "entity.other.attribute-name.sdoc"
						},
						"2": {
							"name": "punctuation.definition.tag.end.sdoc"
						}
					}
				}
			]
		},
		"tag-attributes": {
			"patterns": [
				{
					"match": "([A-Za-z_][\\w:-]*)(=)?",
					"captures": {
						"1": {
							"name": "entity.other.attribute-name.sdoc"
						},
						"2": {
							"name": "punctuation.separator.key-value.sdoc"
						}
					}
				},
				{
					"name": "string.quoted.double.sdoc",
					"begin": "\"",
					"end": "\""
				},
				{
					"name": "string.quoted.single.sdoc",
					"begin": "'",
					"end": "'"
				}
			]
		},
		"attributes": {
			"patterns": [
				{
					"match": "([A-Za-z_][\\w-]*)\\s*(=)",
					"captures": {
						"1": {
							"name": "entity.other.attribute-name.sdoc"
						},
						"2": {
							"name": "punctuation.separator.key-value.sdoc"
						}
					}
				},
				{
					"match": "\\]\\s*$",
					"name": "punctuation.definition.tag.end.sdoc"
				},
				{
					"name": "string.quoted.double.sdoc",
					"begin": "\"",
					"end": "\"",
					"beginCaptures": {
						"0": {
							"name": "punctuation.definition.string.begin.sdoc"
						}
					},
					"endCaptures": {
						"0": {
							"name": "punctuation.definition.string.end.sdoc"
						}
					}
				},
				{
					"include": "#expression"
				},
				{
					"match": "([A-Za-z_][\\w-]*)",
					"name": "entity.other.attribute-name.sdoc"
				}
			]
		},
		"expression": {
			"name": "meta.embedded.expression.sdoc",
			"begin": "\\{",
			"end": "\\}",
			"beginCaptures": {
				"0": {
					"name": "punctuation.section.embedded.begin.sdoc"
				}
			},
			"endCaptures": {
				"0": {
					"name": "punctuation.section.embedded.end.sdoc"
				}
			},
			"patterns": [
				{
					"include": "#expression-inner"
				}
			]
		},
		"expression-inner": {
			"patterns": [
				{
					"begin": "\\{",
					"end": "\\}",
					"patterns": [
						{
							"include": "#expression-inner"
						}
					]
				},
				{
					"include": "source.ts"
				}
			]
		},
		"page-example": {
			"name": "meta.block.example.sdoc",
			"begin": "(^|\\G)\\s*(\\[)((?i:example))\\b(.*)$",
			"beginCaptures": {
				"2": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"3": {
					"name": "entity.name.tag.sdoc"
				},
				"4": {
					"patterns": [
						{
							"include": "#attributes"
						}
					]
				}
			},
			"end": "(^|\\G)\\s*(\\[/)((?i:example))(\\])\\s*$",
			"endCaptures": {
				"2": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"3": {
					"name": "entity.name.tag.sdoc"
				},
				"4": {
					"name": "punctuation.definition.tag.end.sdoc"
				}
			},
			"patterns": [
				{
					"include": "#text-block"
				},
				{
					"include": "#prose"
				},
				{
					"begin": "(^|\\G)",
					"while": "(^|\\G)(?!\\s*\\[(?:NOTES|TODO|PROSE)\\]\\s*$)(?!\\s*\\[/(?i:example)\\]\\s*$)",
					"patterns": [
						{
							"include": "#block-script-ts"
						},
						{
							"include": "#block-script-js"
						},
						{
							"include": "#block-style"
						},
						{
							"include": "source.svelte"
						}
					]
				}
			]
		},
		"block-script-ts": {
			"begin": "(<)(script)(?=[\\s/>])((?=[^>]*lang=([\"'])ts\\4)[^>]*)(>)",
			"beginCaptures": {
				"1": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"2": {
					"name": "entity.name.tag.script.sdoc"
				},
				"3": {
					"patterns": [
						{
							"include": "#tag-attributes"
						}
					]
				},
				"5": {
					"name": "punctuation.definition.tag.end.sdoc"
				}
			},
			"end": "(</)(script)\\s*(>)",
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"2": {
					"name": "entity.name.tag.script.sdoc"
				},
				"3": {
					"name": "punctuation.definition.tag.end.sdoc"
				}
			},
			"contentName": "source.ts",
			"patterns": [
				{
					"include": "source.ts"
				}
			]
		},
		"block-script-js": {
			"begin": "(<)(script)(?=[\\s/>])((?![^>]*lang=([\"'])ts\\4)[^>]*)(>)",
			"beginCaptures": {
				"1": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"2": {
					"name": "entity.name.tag.script.sdoc"
				},
				"3": {
					"patterns": [
						{
							"include": "#tag-attributes"
						}
					]
				},
				"5": {
					"name": "punctuation.definition.tag.end.sdoc"
				}
			},
			"end": "(</)(script)\\s*(>)",
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"2": {
					"name": "entity.name.tag.script.sdoc"
				},
				"3": {
					"name": "punctuation.definition.tag.end.sdoc"
				}
			},
			"contentName": "source.js",
			"patterns": [
				{
					"include": "source.js"
				}
			]
		},
		"block-style": {
			"begin": "(<)(style)(?=[\\s/>])([^>]*)(>)",
			"beginCaptures": {
				"1": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"2": {
					"name": "entity.name.tag.style.sdoc"
				},
				"3": {
					"patterns": [
						{
							"include": "#tag-attributes"
						}
					]
				},
				"4": {
					"name": "punctuation.definition.tag.end.sdoc"
				}
			},
			"end": "(</)(style)\\s*(>)",
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"2": {
					"name": "entity.name.tag.style.sdoc"
				},
				"3": {
					"name": "punctuation.definition.tag.end.sdoc"
				}
			},
			"contentName": "source.css",
			"patterns": [
				{
					"include": "source.css"
				}
			]
		},
		"components-container": {
			"match": "^\\s*(\\[/?)((?i:COMPONENTS))(\\])\\s*$",
			"captures": {
				"1": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"2": {
					"name": "keyword.control.block.sdoc"
				},
				"3": {
					"name": "punctuation.definition.tag.end.sdoc"
				}
			}
		},
		"text-block": {
			"name": "meta.block.text.sdoc",
			"begin": "^\\s*(\\[)(NOTES|TODO)(\\])\\s*$",
			"beginCaptures": {
				"1": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"2": {
					"name": "keyword.control.block.sdoc"
				},
				"3": {
					"name": "punctuation.definition.tag.end.sdoc"
				}
			},
			"end": "^\\s*(\\[/)(NOTES|TODO)(\\])\\s*$",
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"2": {
					"name": "keyword.control.block.sdoc"
				},
				"3": {
					"name": "punctuation.definition.tag.end.sdoc"
				}
			},
			"patterns": [
				{
					"match": "^\\s*(-)\\s+(?:(\\[[ xX]\\])|((?:bug|a11y|warning|perf|tip|info):))?",
					"captures": {
						"1": {
							"name": "punctuation.definition.list.begin.markdown"
						},
						"2": {
							"name": "constant.language.sdoc"
						},
						"3": {
							"name": "entity.name.type.sdoc"
						}
					}
				}
			]
		},
		"prose": {
			"name": "meta.block.prose.sdoc",
			"begin": "^\\s*(\\[)(PROSE)(\\])\\s*$",
			"beginCaptures": {
				"1": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"2": {
					"name": "keyword.control.block.sdoc"
				},
				"3": {
					"name": "punctuation.definition.tag.end.sdoc"
				}
			},
			"end": "^\\s*(\\[/)(PROSE)(\\])\\s*$",
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"2": {
					"name": "keyword.control.block.sdoc"
				},
				"3": {
					"name": "punctuation.definition.tag.end.sdoc"
				}
			},
			"patterns": [
				{
					"include": "text.html.markdown#fenced_code_block"
				},
				{
					"comment": "Same shape as the [DOC] body: the begin consumes the indent the while consumes, so markdown never sees a raw tab and opens an indented code block.",
					"begin": "(^|\\G)(?:\\t|[ ]{1,4})?",
					"while": "(^|\\G)(?!\\s*\\[/(?:PROSE)\\]\\s*$)(?!\\s*(?:`{3,}|~{3,}))(?:\\t|[ ]{1,4})?",
					"contentName": "meta.embedded.block.markdown",
					"patterns": [
						{
							"include": "#page-svelte-block"
						},
						{
							"include": "text.html.markdown"
						}
					]
				}
			]
		},
		"glossary": {
			"name": "meta.block.glossary.sdoc",
			"begin": "^\\s*(\\[)(GLOSSARY)\\b(.*)$",
			"beginCaptures": {
				"1": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"2": {
					"name": "keyword.control.block.sdoc"
				},
				"3": {
					"patterns": [
						{
							"include": "#attributes"
						}
					]
				}
			},
			"end": "^\\s*(\\[/)(GLOSSARY)(\\])\\s*$",
			"endCaptures": {
				"1": {
					"name": "punctuation.definition.tag.begin.sdoc"
				},
				"2": {
					"name": "keyword.control.block.sdoc"
				},
				"3": {
					"name": "punctuation.definition.tag.end.sdoc"
				}
			},
			"patterns": [
				{
					"include": "#opener-continuation"
				},
				{
					"match": "^\\s*(-)\\s+([^:\\n]+)(:)",
					"captures": {
						"1": {
							"name": "punctuation.definition.list.begin.markdown"
						},
						"2": {
							"name": "entity.name.type.sdoc"
						},
						"3": {
							"name": "punctuation.separator.sdoc"
						}
					}
				}
			]
		}
	}
}
