github-linguist 9.1.0 → 9.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/github-linguist +24 -5
- data/grammars/etc.json +1 -1
- data/grammars/injection.interpolated-ruby.json +1 -0
- data/grammars/injections.etc.json +1 -1
- data/grammars/inline.edgeql.json +1 -1
- data/grammars/liquid.injection.json +1 -1
- data/grammars/markdown.move.codeblock.json +1 -1
- data/grammars/source.4dm.json +1 -1
- data/grammars/source.QB64.json +1 -1
- data/grammars/source.abl.json +1 -1
- data/grammars/source.aiken.json +1 -0
- data/grammars/source.apex.json +1 -1
- data/grammars/source.ash.json +1 -0
- data/grammars/source.ats.json +1 -1
- data/grammars/source.ballerina.json +1 -1
- data/grammars/source.brs.json +1 -1
- data/grammars/source.bru.json +1 -0
- data/grammars/source.c++.json +1 -1
- data/grammars/source.c.calendar.json +1 -0
- data/grammars/source.c.json +1 -1
- data/grammars/source.c.linker.json +1 -1
- data/grammars/source.c3.json +1 -0
- data/grammars/source.cl.json +1 -1
- data/grammars/source.clue.json +1 -0
- data/grammars/source.cmake.json +1 -1
- data/grammars/source.cobol.json +1 -1
- data/grammars/source.cooklang.json +1 -0
- data/grammars/source.cs.json +1 -1
- data/grammars/source.curlrc.json +1 -1
- data/grammars/source.daslang.json +1 -0
- data/grammars/source.dds.dspf.json +1 -1
- data/grammars/source.dotenv.json +1 -1
- data/grammars/source.edgeql.json +1 -1
- data/grammars/source.erlang.json +1 -1
- data/grammars/source.flix.json +1 -0
- data/grammars/source.fsharp.json +1 -1
- data/grammars/source.gdscript.json +1 -1
- data/grammars/source.git-revlist.json +1 -1
- data/grammars/source.gitignore.json +1 -1
- data/grammars/source.gleam.json +1 -1
- data/grammars/source.harbour.json +1 -1
- data/grammars/source.httpspec.json +1 -1
- data/grammars/source.hx.json +1 -1
- data/grammars/source.ilecobol.json +1 -0
- data/grammars/source.inputrc.json +1 -1
- data/grammars/source.jai.json +1 -1
- data/grammars/source.jq.json +1 -1
- data/grammars/source.json.comments.json +1 -1
- data/grammars/source.julia.console.json +1 -1
- data/grammars/source.julia.json +1 -1
- data/grammars/source.just.json +1 -1
- data/grammars/source.koka.json +1 -0
- data/grammars/source.lean4.json +1 -1
- data/grammars/source.leo.json +1 -0
- data/grammars/source.livescript.json +1 -1
- data/grammars/source.luau.json +1 -1
- data/grammars/source.m2.json +1 -1
- data/grammars/source.m3u.json +1 -0
- data/grammars/source.mermaid.flowchart.json +1 -1
- data/grammars/source.mermaid.gantt.json +1 -1
- data/grammars/source.mermaid.json +1 -1
- data/grammars/source.mermaid.pie-chart.json +1 -1
- data/grammars/source.mermaid.quad-chart.json +1 -0
- data/grammars/source.mermaid.sankey.json +1 -0
- data/grammars/source.mermaid.timeline.json +1 -0
- data/grammars/source.mermaid.user-journey.json +1 -1
- data/grammars/source.mermaid.zenuml.json +1 -0
- data/grammars/source.moonbit.json +1 -1
- data/grammars/source.move.json +1 -1
- data/grammars/source.nasl.json +1 -1
- data/grammars/source.nginx.json +1 -1
- data/grammars/source.nickel.json +1 -0
- data/grammars/source.nim.json +1 -1
- data/grammars/source.nr.json +1 -1
- data/grammars/source.nushell.json +1 -1
- data/grammars/source.objc.json +1 -1
- data/grammars/source.odin-ehr.json +1 -1
- data/grammars/source.odin.json +1 -1
- data/grammars/source.openqasm.json +1 -0
- data/grammars/source.postscript.json +1 -1
- data/grammars/source.psl.json +1 -0
- data/grammars/source.quakec.json +1 -0
- data/grammars/source.record-jar.json +1 -1
- data/grammars/source.rescript.json +1 -1
- data/grammars/source.roc.json +1 -1
- data/grammars/source.rosmsg.json +1 -0
- data/grammars/source.rust.json +1 -1
- data/grammars/source.sail.json +1 -0
- data/grammars/source.sieve.json +1 -1
- data/grammars/source.slang.json +1 -1
- data/grammars/source.slint.json +1 -1
- data/grammars/source.smithy.json +1 -1
- data/grammars/source.soql.json +1 -1
- data/grammars/source.stan.json +1 -1
- data/grammars/source.sway.json +1 -1
- data/grammars/source.swift.json +1 -1
- data/grammars/source.tact.json +1 -1
- data/grammars/source.talon.json +1 -1
- data/grammars/source.templ.json +1 -1
- data/grammars/source.toc.json +1 -1
- data/grammars/source.torrc.json +1 -0
- data/grammars/source.typst.json +1 -1
- data/grammars/source.uplc.json +1 -0
- data/grammars/source.vba.json +1 -1
- data/grammars/source.vcl.json +1 -0
- data/grammars/source.vento.json +1 -0
- data/grammars/source.vhdl.json +1 -1
- data/grammars/source.vue.json +1 -1
- data/grammars/source.wdl.json +1 -1
- data/grammars/source.wesl.json +1 -0
- data/grammars/source.wgsl.json +1 -1
- data/grammars/source.wit.json +1 -1
- data/grammars/source.zmodel.json +1 -0
- data/grammars/text.adblock.json +1 -1
- data/grammars/text.codeowners.json +1 -1
- data/grammars/text.html.jte.json +1 -1
- data/grammars/text.html.liquid.json +1 -1
- data/grammars/text.html.vento.json +1 -0
- data/grammars/text.jira.json +1 -0
- data/grammars/text.marko.json +1 -1
- data/grammars/text.slim.json +1 -1
- data/grammars/text.srt.json +1 -1
- data/grammars/text.valve-cfg.json +1 -1
- data/grammars/text.xml.svg.json +1 -1
- data/grammars/version +1 -1
- data/lib/linguist/VERSION +1 -1
- data/lib/linguist/generated.rb +28 -6
- data/lib/linguist/generic.yml +2 -0
- data/lib/linguist/heuristics.yml +47 -9
- data/lib/linguist/instrumenter.rb +19 -0
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +327 -102
- data/lib/linguist/samples.json +1 -1
- data/lib/linguist.rb +1 -0
- metadata +39 -12
- data/grammars/source.c.platform.json +0 -1
- data/grammars/source.varnish.vcl.json +0 -1
data/grammars/text.marko.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"name":"Marko","scopeName":"text.marko","patterns":[{"name":"meta.embedded.css","contentName":"source.css","begin":"^\\s*(style)\\s+(\\{)","end":"\\}","patterns":[{"include":"source.css"}],"beginCaptures":{"1":{"name":"storage.type.marko.css"},"2":{"name":"punctuation.section.scope.begin.marko.css"}},"endCaptures":{"0":{"name":"punctuation.section.scope.end.marko.css"}}},{"name":"meta.embedded.less","contentName":"source.less","begin":"^\\s*(style)\\.(less)\\s+(\\{)","end":"\\}","patterns":[{"include":"source.css.less"}],"beginCaptures":{"1":{"name":"storage.type.marko.css"},"2":{"name":"storage.modifier.marko.css"},"3":{"name":"punctuation.section.scope.begin.marko.css"}},"endCaptures":{"0":{"name":"punctuation.section.scope.end.marko.css"}}},{"name":"meta.embedded.scss","contentName":"source.scss","begin":"^\\s*(style)\\.(scss)\\s+(\\{)","end":"\\}","patterns":[{"include":"source.css.scss"}],"beginCaptures":{"1":{"name":"storage.type.marko.css"},"2":{"name":"storage.modifier.marko.css"},"3":{"name":"punctuation.section.scope.begin.marko.css"}},"endCaptures":{"0":{"name":"punctuation.section.scope.end.marko.css"}}},{"name":"meta.embedded.js","contentName":"source.js","begin":"^\\s*(?:(static )|(?=(?:class|import|export) ))","end":"(?=\\n|$)","patterns":[{"include":"#javascript-statement"}],"beginCaptures":{"1":{"name":"keyword.control.static.marko"}}},{"include":"#content-concise-mode"}],"repository":{"attrs":{"patterns":[{"name":"meta.marko-attribute","begin":"(?:\\s+|,)(?:(key|on[a-zA-Z0-9_$-]+|[a-zA-Z0-9_$]+Change|no-update(?:-body)?(?:-if)?)|([a-zA-Z0-9_$][a-zA-Z0-9_$-]*))(:[a-zA-Z0-9_$][a-zA-Z0-9_$-]*)?","end":"(?=.|$)","patterns":[{"include":"#html-args-or-method"},{"name":"meta.embedded.js","contentName":"source.js","begin":"\\s*(:?=)\\s*","end":"(?=.|$)","patterns":[{"include":"#javascript-expression"}],"beginCaptures":{"1":{"patterns":[{"include":"source.js"}]}},"applyEndPatternLast":true}],"beginCaptures":{"1":{"name":"support.type.attribute-name.marko"},"2":{"name":"entity.other.attribute-name.marko"},"3":{"name":"support.function.attribute-name.marko"}},"applyEndPatternLast":true},{"name":"meta.marko-spread-attribute","contentName":"source.js","begin":"(?:\\s+|,)\\.\\.\\.","end":"(?=.|$)","patterns":[{"include":"#javascript-expression"}],"beginCaptures":{"1":{"name":"keyword.operator.spread.marko"}},"applyEndPatternLast":true},{"begin":"\\s*(,(?!,))","end":"(?!\\S)","captures":{"1":{"patterns":[{"include":"source.js"}]}}},{"include":"#javascript-comment-multiline"},{"include":"#invalid"}]},"concise-html-block":{"name":"meta.section.marko-html-block","begin":"\\s*(--+)\\s*$","end":"\\1","patterns":[{"include":"#content-html-mode"}],"beginCaptures":{"2":{"name":"punctuation.section.scope.begin.marko"}},"endCaptures":{"1":{"name":"punctuation.section.scope.end.marko"}}},"concise-html-line":{"name":"meta.section.marko-html-line","match":"\\s*(--+)(?=\\s+\\S)(.*$)","captures":{"1":{"name":"punctuation.section.scope.begin.marko"},"2":{"patterns":[{"include":"#html-comments"},{"include":"#tag-html"},{"name":"string","match":"\\\\."},{"include":"#placeholder"},{"name":"string","match":".+?"}]}}},"concise-open-tag-content":{"patterns":[{"include":"#tag-before-attrs"},{"begin":"\\s*\\[","end":"]","patterns":[{"include":"#attrs"},{"include":"#invalid"}],"beginCaptures":{"0":{"name":"punctuation.section.scope.begin.marko"}},"endCaptures":{"0":{"name":"punctuation.section.scope.end.marko"}}},{"begin":"(?!^)(?= )","end":"(?=--)|(?\u003c!,)(?=\\n)","patterns":[{"include":"#attrs"},{"include":"#invalid"}]}]},"concise-script-block":{"name":"meta.section.marko-script-block","begin":"(\\s+)(--+)\\s*$","end":"(\\2)|(?=^(?!\\1)\\s*\\S)","patterns":[{"include":"#content-embedded-script"}],"beginCaptures":{"2":{"name":"punctuation.section.scope.begin.marko"}},"endCaptures":{"1":{"name":"punctuation.section.scope.end.marko"}}},"concise-script-line":{"name":"meta.section.marko-script-line","begin":"\\s*(--+)","end":"$","patterns":[{"include":"#content-embedded-script"}],"beginCaptures":{"1":{"name":"punctuation.section.scope.begin.marko"}},"applyEndPatternLast":true},"concise-style-block":{"name":"meta.section.marko-style-block","contentName":"source.css","begin":"(\\s+)(--+)\\s*$","end":"(\\2)|(?=^(?!\\1)\\s*\\S)","patterns":[{"include":"#content-embedded-style"}],"beginCaptures":{"2":{"name":"punctuation.section.scope.begin.marko"}},"endCaptures":{"1":{"name":"punctuation.section.scope.end.marko"}}},"concise-style-block-less":{"name":"meta.section.marko-style-block","contentName":"source.less","begin":"(\\s+)(--+)\\s*$","end":"(\\2)|(?=^(?!\\1)\\s*\\S)","patterns":[{"include":"#content-embedded-style-less"}],"beginCaptures":{"2":{"name":"punctuation.section.scope.begin.marko"}},"endCaptures":{"1":{"name":"punctuation.section.scope.end.marko"}}},"concise-style-block-scss":{"name":"meta.section.marko-style-block","contentName":"source.scss","begin":"(\\s+)(--+)\\s*$","end":"(\\2)|(?=^(?!\\1)\\s*\\S)","patterns":[{"include":"#content-embedded-style-scss"}],"beginCaptures":{"2":{"name":"punctuation.section.scope.begin.marko"}},"endCaptures":{"1":{"name":"punctuation.section.scope.end.marko"}}},"concise-style-line":{"name":"meta.section.marko-style-line","contentName":"source.css","begin":"\\s*(--+)","end":"$","patterns":[{"include":"#content-embedded-style"}],"beginCaptures":{"1":{"name":"punctuation.section.scope.begin.marko"}},"applyEndPatternLast":true},"concise-style-line-less":{"name":"meta.section.marko-style-line","contentName":"source.less","begin":"\\s*(--+)","end":"$","patterns":[{"include":"#content-embedded-style-less"}],"beginCaptures":{"1":{"name":"punctuation.section.scope.begin.marko"}},"applyEndPatternLast":true},"concise-style-line-scss":{"name":"meta.section.marko-style-line","contentName":"source.scss","begin":"\\s*(--+)","end":"$","patterns":[{"include":"#content-embedded-style-scss"}],"beginCaptures":{"1":{"name":"punctuation.section.scope.begin.marko"}},"applyEndPatternLast":true},"content-concise-mode":{"name":"meta.marko-concise-content","patterns":[{"include":"#scriptlet"},{"include":"#javascript-comments"},{"include":"#html-comments"},{"include":"#concise-html-block"},{"include":"#concise-html-line"},{"include":"#tag-html"},{"patterns":[{"begin":"^(\\s*)(?=style\\.less\\b)","while":"(?=^\\1\\s+(\\S|$))","patterns":[{"include":"#concise-open-tag-content"},{"include":"#concise-style-block-less"},{"include":"#concise-style-line-less"}]},{"begin":"^(\\s*)(?=style\\.scss\\b)","while":"(?=^\\1\\s+(\\S|$))","patterns":[{"include":"#concise-open-tag-content"},{"include":"#concise-style-block-scss"},{"include":"#concise-style-line-scss"}]},{"begin":"^(\\s*)(?=style\\b)","while":"(?=^\\1\\s+(\\S|$))","patterns":[{"include":"#concise-open-tag-content"},{"include":"#concise-style-block"},{"include":"#concise-style-line"}]},{"begin":"^(\\s*)(?=script\\b)","while":"(?=^\\1\\s+(\\S|$))","patterns":[{"include":"#concise-open-tag-content"},{"include":"#concise-script-block"},{"include":"#concise-script-line"}]},{"begin":"^(\\s*)(?=[a-zA-Z0-9_$@])","while":"(?=^\\1\\s+(\\S|$))","patterns":[{"include":"#concise-open-tag-content"},{"include":"#content-concise-mode"}]}]},{"include":"#invalid"}]},"content-embedded-script":{"name":"meta.embedded.js","patterns":[{"include":"#placeholder"},{"include":"source.js"}]},"content-embedded-style":{"name":"meta.embedded.css","patterns":[{"include":"#placeholder"},{"include":"source.css"}]},"content-embedded-style-less":{"name":"meta.embedded.css.less","patterns":[{"include":"#placeholder"},{"include":"source.css.less"}]},"content-embedded-style-scss":{"name":"meta.embedded.css.scss","patterns":[{"include":"#placeholder"},{"include":"source.css.scss"}]},"content-html-mode":{"patterns":[{"include":"#scriptlet"},{"include":"#html-comments"},{"include":"#tag-html"},{"name":"string","match":"\\\\."},{"include":"#placeholder"},{"name":"string","match":".+?"}]},"html-args-or-method":{"patterns":[{"include":"#javascript-args"},{"name":"meta.embedded.js","contentName":"source.js","begin":"(?\u003c=\\))\\s*(?=\\{)","end":"(?\u003c=\\})","patterns":[{"include":"source.js"}]}]},"html-comments":{"patterns":[{"name":"comment.block.marko","begin":"\\s*(\u003c!(--)?)","end":"\\2\u003e","beginCaptures":{"1":{"name":"punctuation.definition.comment.marko"}},"endCaptures":{"0":{"name":"punctuation.definition.comment.marko"}}},{"name":"comment.block.marko","begin":"\\s*(\u003chtml-comment\u003e)","end":"\u003c/html-comment\u003e","beginCaptures":{"1":{"name":"punctuation.definition.comment.marko"}},"endCaptures":{"0":{"name":"punctuation.definition.comment.marko"}}}]},"invalid":{"name":"invalid.illegal.character-not-allowed-here.marko","match":"[^\\s]"},"javascript-args":{"name":"meta.embedded.js","contentName":"source.js","begin":"(?=\\()","end":"(?\u003c=\\))","patterns":[{"include":"source.js"}]},"javascript-comment-line":{"contentName":"source.js","match":"\\s*//.*$","captures":{"0":{"patterns":[{"include":"source.js"}]}}},"javascript-comment-multiline":{"contentName":"source.js","begin":"\\s*(?=/\\*)","end":"(?\u003c=\\*/)","patterns":[{"include":"source.js"}]},"javascript-comments":{"patterns":[{"include":"#javascript-comment-multiline"},{"include":"#javascript-comment-line"}]},"javascript-enclosed":{"patterns":[{"include":"#javascript-comments"},{"include":"#javascript-args"},{"begin":"(?={)","end":"(?\u003c=})","patterns":[{"include":"source.js"}]},{"begin":"(?=\\[)","end":"(?\u003c=])","patterns":[{"include":"source.js"}]},{"begin":"(?=\")","end":"(?\u003c=\")","patterns":[{"include":"source.js"}]},{"begin":"(?=')","end":"(?\u003c=')","patterns":[{"include":"source.js"}]},{"begin":"(?=`)","end":"(?\u003c=`)","patterns":[{"include":"source.js"}]},{"contentName":"source.js","begin":"/(?!\u003c[\\]})A-Z0-9.\u003c%]\\s*/)(?!/?\u003e|$)","end":"/[gimsuy]*","patterns":[{"include":"source.js#regexp"},{"include":"source.js"}],"captures":{"0":{"name":"string.regexp.js"}}},{"begin":"(?x)\\s*(?:\n\t\t\t\t\t\t\t\t(?:\\b(?:new|typeof|instanceof|in)\\b)| # Keyword operators\n\t\t\t\t\t\t\t\t\\\u0026\\\u0026|\\|\\|| # Logical operators\n\t\t\t\t\t\t\t\t[\\^|\u0026]| # Bitwise operators\n\t\t\t\t\t\t\t\t[!=]=|[!=]==|\u003c|\u003c[=\u003c]|=\u003e| # Comparison operators (Note you cannot use * or ? here)\n\t\t\t\t\t\t\t\t[?:]| # Ternary operators\n\t\t\t\t\t\t\t\t[-+*%](?!-) # Arithmetic operators\n\t\t\t\t\t\t\t)","end":"(?=\\S)","captures":{"0":{"patterns":[{"include":"source.js"}]}}}]},"javascript-expression":{"patterns":[{"include":"#javascript-enclosed"},{"match":"[0-9a-zA-Z$_.]+","captures":{"0":{"patterns":[{"include":"source.js"}]}}}]},"javascript-statement":{"patterns":[{"include":"#javascript-enclosed"},{"include":"source.js"}]},"open-tag-content":{"patterns":[{"include":"#tag-before-attrs"},{"begin":"(?= )","end":"(?=/?\u003e)","patterns":[{"include":"#attrs"}]}]},"placeholder":{"contentName":"source.js","begin":"\\$!?{","end":"}","patterns":[{"include":"source.js"}],"beginCaptures":{"0":{"name":"punctuation.definition.template-expression.begin.js"}},"endCaptures":{"0":{"name":"punctuation.definition.template-expression.end.js"}}},"scriptlet":{"name":"meta.embedded.js","contentName":"source.js","begin":"^\\s*(\\$)\\s+","end":"$","patterns":[{"include":"#javascript-statement"}],"beginCaptures":{"1":{"name":"keyword.control.scriptlet.marko"}}},"tag-before-attrs":{"patterns":[{"include":"#tag-name"},{"name":"entity.other.attribute-name.marko","match":"[#.][a-zA-Z0-9_$][a-zA-Z0-9_$-]*"},{"name":"meta.embedded.js","contentName":"source.js","begin":"/(?!/)","end":"(?=:?\\=|\\s|\u003e|$|\\||\\(|/)","patterns":[{"name":"variable.other.constant.object.js","match":"[a-zA-Z$_][0-9a-zA-Z$_]*"},{"include":"source.js#object-binding-pattern"},{"include":"source.js#array-binding-pattern"},{"include":"source.js#var-single-variable"},{"include":"#javascript-expression"}],"beginCaptures":{"0":{"name":"punctuation.separator.key-value.marko"}}},{"name":"meta.embedded.js","contentName":"source.js","begin":"\\s*(:?=)\\s*","end":"(?=.|$)","patterns":[{"include":"#javascript-expression"}],"beginCaptures":{"1":{"patterns":[{"include":"source.js"}]}},"applyEndPatternLast":true},{"begin":"\\|","end":"\\|","patterns":[{"include":"source.js#function-parameters-body"},{"include":"source.js"}],"beginCaptures":{"0":{"name":"punctuation.section.scope.begin.marko"}},"endCaptures":{"0":{"name":"punctuation.section.scope.end.marko"}}},{"include":"#html-args-or-method"}]},"tag-html":{"patterns":[{"begin":"\\s*(\u003c)(?=(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)\\b)","end":"/?\u003e","patterns":[{"include":"#open-tag-content"}],"beginCaptures":{"1":{"name":"punctuation.definition.tag.end.marko"}},"endCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}}},{"begin":"\\s*(\u003c)(?=style\\.less\\b)","end":"/\u003e|(?\u003c=\\\u003e)","patterns":[{"include":"#open-tag-content"},{"contentName":"source.less","begin":"\u003e","end":"\\s*(\u003c/)(style)?(\u003e)","patterns":[{"include":"#content-embedded-style-less"}],"beginCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}},"endCaptures":{"1":{"name":"punctuation.definition.tag.end.marko"},"2":{"patterns":[{"include":"#tag-name"}]},"3":{"name":"punctuation.definition.tag.end.marko"}}}],"beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"}},"endCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}}},{"begin":"\\s*(\u003c)(?=style\\.scss\\b)","end":"/\u003e|(?\u003c=\\\u003e)","patterns":[{"include":"#open-tag-content"},{"contentName":"source.less","begin":"\u003e","end":"\\s*(\u003c/)(style)?(\u003e)","patterns":[{"include":"#content-embedded-style-scss"}],"beginCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}},"endCaptures":{"1":{"name":"punctuation.definition.tag.end.marko"},"2":{"patterns":[{"include":"#tag-name"}]},"3":{"name":"punctuation.definition.tag.end.marko"}}}],"beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"}},"endCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}}},{"begin":"\\s*(\u003c)(?=style\\b)","end":"/\u003e|(?\u003c=\\\u003e)","patterns":[{"include":"#open-tag-content"},{"contentName":"source.css","begin":"\u003e","end":"\\s*(\u003c/)(style)?(\u003e)","patterns":[{"include":"#content-embedded-style"}],"beginCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}},"endCaptures":{"1":{"name":"punctuation.definition.tag.end.marko"},"2":{"patterns":[{"include":"#tag-name"}]},"3":{"name":"punctuation.definition.tag.end.marko"}}}],"beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"}},"endCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}}},{"begin":"\\s*(\u003c)(?=script\\b)","end":"/\u003e|(?\u003c=\\\u003e)","patterns":[{"include":"#open-tag-content"},{"contentName":"source.js","begin":"\u003e","end":"\\s*(\u003c/)(script)?(\u003e)","patterns":[{"include":"#content-embedded-script"}],"beginCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}},"endCaptures":{"1":{"name":"punctuation.definition.tag.end.marko"},"2":{"patterns":[{"include":"#tag-name"}]},"3":{"name":"punctuation.definition.tag.end.marko"}}}],"beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"}},"endCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}}},{"begin":"\\s*(\u003c)(?=[a-zA-Z0-9_$@])","end":"/\u003e|(?\u003c=\\\u003e)","patterns":[{"include":"#open-tag-content"},{"begin":"\u003e","end":"\\s*(\u003c/)([a-zA-Z0-9_$:@-]+)?(.*?)(\u003e)","patterns":[{"include":"#content-html-mode"}],"beginCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}},"endCaptures":{"1":{"name":"punctuation.definition.tag.end.marko"},"2":{"patterns":[{"include":"#tag-name"}]},"3":{"patterns":[{"include":"#invalid"}]},"4":{"name":"punctuation.definition.tag.end.marko"}}}],"beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"}},"endCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}}}]},"tag-name":{"patterns":[{"begin":"\\${","end":"}","patterns":[{"include":"source.js"}],"beginCaptures":{"0":{"name":"punctuation.definition.template-expression.begin.js"}},"endCaptures":{"0":{"name":"punctuation.definition.template-expression.end.js"}}},{"match":"(style)\\.([a-zA-Z0-9$_-]+(?:\\.[a-zA-Z0-9$_-]+)*)|([a-zA-Z0-9_$@][a-zA-Z0-9_$@:-]*)","captures":{"1":{"name":"entity.name.tag.marko"},"2":{"name":"storage.type.marko.css"},"3":{"patterns":[{"name":"support.type.builtin.marko","match":"(attrs|return|import)(?=\\b)"},{"name":"support.function.marko","match":"(for|if|while|else-if|else|macro|tag|await|let|const|effect|set|get|id|lifecycle)(?=\\b)"},{"name":"entity.other.attribute-name.marko","match":"@.+"},{"name":"entity.name.tag.marko","match":".+"}]}}}]}}}
|
1
|
+
{"name":"Marko","scopeName":"text.marko","patterns":[{"name":"meta.embedded.css","contentName":"source.css","begin":"^\\s*(style)(\\b[^\\s]*\\.css)?\\s+({)","end":"}","patterns":[{"include":"source.css"}],"beginCaptures":{"1":{"name":"support.type.builtin.marko"},"2":{"name":"storage.modifier.marko.css"},"3":{"name":"punctuation.section.scope.begin.marko.css"}},"endCaptures":{"0":{"name":"punctuation.section.scope.end.marko.css"}}},{"name":"meta.embedded.less","contentName":"source.less","begin":"^\\s*(style)(\\b[^\\s]*\\.less)\\s+({)","end":"}","patterns":[{"include":"source.css.less"}],"beginCaptures":{"1":{"name":"support.type.builtin.marko"},"2":{"name":"storage.modifier.marko.css"},"3":{"name":"punctuation.section.scope.begin.marko.css"}},"endCaptures":{"0":{"name":"punctuation.section.scope.end.marko.css"}}},{"name":"meta.embedded.scss","contentName":"source.scss","begin":"^\\s*(style)(\\b[^\\s]*\\.scss)\\s+({)","end":"}","patterns":[{"include":"source.css.scss"}],"beginCaptures":{"1":{"name":"support.type.builtin.marko"},"2":{"name":"storage.modifier.marko.css"},"3":{"name":"punctuation.section.scope.begin.marko.css"}},"endCaptures":{"0":{"name":"punctuation.section.scope.end.marko.css"}}},{"name":"meta.embedded.ts","contentName":"source.ts","begin":"^\\s*(style)(\\b[^\\s]*\\.[tj]s)\\s+({)","end":"}","patterns":[{"include":"source.ts"}],"beginCaptures":{"1":{"name":"support.type.builtin.marko"},"2":{"name":"storage.modifier.marko.css"},"3":{"name":"punctuation.section.scope.begin.marko.css"}},"endCaptures":{"0":{"name":"punctuation.section.scope.end.marko.css"}}},{"name":"meta.embedded.ts","contentName":"source.ts","begin":"^\\s*(?:((?:static|server|client)\\b)|(?=(?:class|import|export)\\b))","end":"(?=\\n|$)","patterns":[{"include":"source.ts"}],"beginCaptures":{"1":{"name":"keyword.control.static.marko"}}},{"include":"#content-concise-mode"}],"repository":{"attr-value":{"name":"meta.embedded.ts","contentName":"source.ts","begin":"\\s*(:?=)\\s*","end":"(?=[,;\\]]|/\u003e|(?\u003c=[^=\u003e])\u003e|(?\u003c!^|[!~*%\u0026^|?:]|[!~*%\u0026^|?/\u003c\u003e+=-]=|[=\u003e]\u003e|[^.]\\.|[^-]-|[^+]\\+|[a-zA-Z0-9%).\u003c\\]}]\\s/|[^.$\\w]await|[^.$\\w]async|[^.$\\w]class|[^.$\\w]function|[^.$\\w]keyof|[^.$\\w]new|[^.$\\w]readonly|[^.$\\w]infer|[^.$\\w]typeof|[^.$\\w]void)\\s+(?![\\n{(+!~*%\u0026^|?:]|[\u003c\u003e/=-]=|[=\u003e]\u003e|\\.[^.]|-[^-]|/[^\u003e]|(?:in|instanceof|satisfies|as|extends)\\s+[^:=/,;\u003e]))","patterns":[{"include":"#javascript-expression"}],"beginCaptures":{"1":{"patterns":[{"include":"source.ts"}]}}},"attrs":{"patterns":[{"include":"#javascript-comments"},{"name":"meta.marko-attribute","begin":"(?:(key|on[a-zA-Z0-9_$-]+|[a-zA-Z0-9_$]+Change|no-update(?:-body)?(?:-if)?)|([a-zA-Z0-9_$][a-zA-Z0-9_$-]*)|(#[a-zA-Z0-9_$][a-zA-Z0-9_$-]*))(:[a-zA-Z0-9_$][a-zA-Z0-9_$-]*)?","end":"(?=.|$)","patterns":[{"include":"#html-args-or-method"},{"include":"#attr-value"}],"beginCaptures":{"1":{"name":"support.type.attribute-name.marko"},"2":{"name":"entity.other.attribute-name.marko"},"3":{"name":"support.function.attribute-name.marko"},"4":{"name":"support.function.attribute-name.marko"}},"applyEndPatternLast":true},{"name":"meta.marko-spread-attribute","contentName":"source.ts","begin":"(\\.\\.\\.)","end":"(?=[,;\\]]|/\u003e|(?\u003c=[^=\u003e])\u003e|(?\u003c!^|[!~*%\u0026^|?:]|[!~*%\u0026^|?/\u003c\u003e+=-]=|[=\u003e]\u003e|[^.]\\.|[^-]-|[^+]\\+|[a-zA-Z0-9%).\u003c\\]}]\\s/|[^.$\\w]await|[^.$\\w]async|[^.$\\w]class|[^.$\\w]function|[^.$\\w]keyof|[^.$\\w]new|[^.$\\w]readonly|[^.$\\w]infer|[^.$\\w]typeof|[^.$\\w]void)\\s+(?![\\n{(+!~*%\u0026^|?:]|[\u003c\u003e/=-]=|[=\u003e]\u003e|\\.[^.]|-[^-]|/[^\u003e]|(?:in|instanceof|satisfies|as|extends)\\s+[^:=/,;\u003e]))","patterns":[{"include":"#javascript-expression"}],"beginCaptures":{"1":{"name":"keyword.operator.spread.marko"}}},{"begin":"\\s*(,(?!,))","end":"(?=\\S)","captures":{"1":{"name":"punctuation.separator.comma.marko"}}},{"include":"#invalid"}]},"cdata":{"name":"meta.tag.metadata.cdata.marko","contentName":"string.other.inline-data.marko","begin":"\\s*\u003c!\\[CDATA\\[","end":"]]\u003e","beginCaptures":{"0":{"name":"punctuation.definition.tag.begin.marko"}},"endCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}}},"concise-attr-group":{"begin":"\\s*(\\[)","end":"]","patterns":[{"include":"#concise-attr-group"},{"begin":"\\s+","end":"(?=\\S)"},{"include":"#attrs"},{"include":"#invalid"}],"beginCaptures":{"1":{"name":"punctuation.section.scope.begin.marko"}},"endCaptures":{"0":{"name":"punctuation.section.scope.end.marko"}}},"concise-comment-block":{"name":"meta.section.marko-comment-block","begin":"\\s*(--+)\\s*$","end":"\\1","patterns":[{"include":"#content-embedded-comment"}],"beginCaptures":{"1":{"name":"punctuation.section.embedded.scope.begin.marko"}},"endCaptures":{"0":{"name":"punctuation.section.embedded.scope.end.marko"}}},"concise-comment-line":{"name":"meta.section.marko-comment-line","begin":"\\s*(--+)","end":"$","patterns":[{"include":"#content-embedded-comment"}],"beginCaptures":{"1":{"name":"punctuation.section.embedded.scope.begin.marko"}},"endCaptures":{"0":{"name":"punctuation.section.embedded.scope.end.marko"}},"applyEndPatternLast":true},"concise-html-block":{"name":"meta.section.marko-html-block","begin":"\\s*(--+)\\s*$","end":"\\1","patterns":[{"include":"#content-html-mode"}],"beginCaptures":{"1":{"name":"punctuation.section.embedded.scope.begin.marko"}},"endCaptures":{"0":{"name":"punctuation.section.embedded.scope.end.marko"}}},"concise-html-line":{"name":"meta.section.marko-html-line","match":"\\s*(--+)(?=\\s+\\S)(.*)($)","captures":{"1":{"name":"punctuation.section.embedded.scope.begin.marko"},"2":{"patterns":[{"include":"#cdata"},{"include":"#doctype"},{"include":"#declaration"},{"include":"#javascript-comments-after-whitespace"},{"include":"#html-comment"},{"include":"#tag-html"},{"name":"text.marko","match":"\\\\."},{"include":"#placeholder"},{"name":"text.marko","match":".+?"}]},"3":{"name":"punctuation.section.embedded.scope.end.marko"}}},"concise-open-tag-content":{"patterns":[{"include":"#invalid-close-tag"},{"include":"#tag-before-attrs"},{"include":"#concise-semi-eol"},{"begin":"(?!^)[, \\t]","end":"(?=--)|(?=\\n)","patterns":[{"include":"#concise-semi-eol"},{"include":"#concise-attr-group"},{"begin":"[ \\t]+","end":"(?=\\S|\\n)"},{"include":"#attrs"},{"include":"#invalid"}]}]},"concise-script-block":{"name":"meta.section.marko-script-block","begin":"\\s*(--+)\\s*$","end":"\\1","patterns":[{"include":"#content-embedded-script"}],"beginCaptures":{"1":{"name":"punctuation.section.embedded.scope.begin.marko"}},"endCaptures":{"0":{"name":"punctuation.section.embedded.scope.end.marko"}}},"concise-script-line":{"name":"meta.section.marko-script-line","begin":"\\s*(--+)","end":"$","patterns":[{"include":"#content-embedded-script"}],"beginCaptures":{"1":{"name":"punctuation.section.embedded.scope.begin.marko"}},"endCaptures":{"0":{"name":"punctuation.section.embedded.scope.end.marko"}},"applyEndPatternLast":true},"concise-semi-eol":{"begin":"\\s*(;)","end":"$","patterns":[{"include":"#javascript-comments"},{"include":"#html-comment"},{"include":"#invalid"}],"beginCaptures":{"1":{"name":"punctuation.terminator.marko"}}},"concise-style-block":{"name":"meta.section.marko-style-block","contentName":"source.css","begin":"\\s*(--+)\\s*$","end":"\\1","patterns":[{"include":"#content-embedded-style"}],"beginCaptures":{"1":{"name":"punctuation.section.embedded.scope.begin.marko"}},"endCaptures":{"0":{"name":"punctuation.section.embedded.scope.end.marko"}}},"concise-style-block-less":{"name":"meta.section.marko-style-block","contentName":"source.less","begin":"\\s*(--+)\\s*$","end":"\\1","patterns":[{"include":"#content-embedded-style-less"}],"beginCaptures":{"1":{"name":"punctuation.section.embedded.scope.begin.marko"}},"endCaptures":{"0":{"name":"punctuation.section.embedded.scope.end.marko"}}},"concise-style-block-scss":{"name":"meta.section.marko-style-block","contentName":"source.scss","begin":"\\s*(--+)\\s*$","end":"\\1","patterns":[{"include":"#content-embedded-style-scss"}],"beginCaptures":{"1":{"name":"punctuation.section.embedded.scope.begin.marko"}},"endCaptures":{"0":{"name":"punctuation.section.embedded.scope.end.marko"}}},"concise-style-line":{"name":"meta.section.marko-style-line","contentName":"source.css","begin":"\\s*(--+)","end":"$","patterns":[{"include":"#content-embedded-style"}],"beginCaptures":{"1":{"name":"punctuation.section.embedded.scope.begin.marko"}},"endCaptures":{"0":{"name":"punctuation.section.embedded.scope.end.marko"}},"applyEndPatternLast":true},"concise-style-line-less":{"name":"meta.section.marko-style-line","contentName":"source.less","begin":"\\s*(--+)","end":"$","patterns":[{"include":"#content-embedded-style-less"}],"beginCaptures":{"1":{"name":"punctuation.section.embedded.scope.begin.marko"}},"endCaptures":{"0":{"name":"punctuation.section.embedded.scope.end.marko"}},"applyEndPatternLast":true},"concise-style-line-scss":{"name":"meta.section.marko-style-line","contentName":"source.scss","begin":"\\s*(--+)","end":"$","patterns":[{"include":"#content-embedded-style-scss"}],"beginCaptures":{"1":{"name":"punctuation.section.embedded.scope.begin.marko"}},"endCaptures":{"0":{"name":"punctuation.section.embedded.scope.end.marko"}},"applyEndPatternLast":true},"content-concise-mode":{"name":"meta.marko-concise-content","patterns":[{"include":"#scriptlet"},{"include":"#javascript-comments"},{"include":"#cdata"},{"include":"#doctype"},{"include":"#declaration"},{"include":"#html-comment"},{"include":"#concise-html-block"},{"include":"#concise-html-line"},{"include":"#invalid-close-tag"},{"include":"#tag-html"},{"patterns":[{"begin":"^(\\s*)(?=html-comment\\b)","while":"(?=^(?:\\s*[})\\]`]|\\*/|\\s*$|\\1\\s+(\\S|$)))","patterns":[{"include":"#concise-open-tag-content"},{"include":"#concise-comment-block"},{"include":"#concise-comment-line"}]},{"begin":"^(\\s*)(?=(?:html-)?style\\b[^\\s]*\\.less\\b)","while":"(?=^(?:\\s*[})\\]`]|\\*/|\\s*$|\\1\\s+(\\S|$)))","patterns":[{"include":"#concise-open-tag-content"},{"include":"#concise-style-block-less"},{"include":"#concise-style-line-less"}]},{"begin":"^(\\s*)(?=(?:html-)?style\\b[^\\s]*\\.scss\\b)","while":"(?=^(?:\\s*[})\\]`]|\\*/|\\s*$|\\1\\s+(\\S|$)))","patterns":[{"include":"#concise-open-tag-content"},{"include":"#concise-style-block-scss"},{"include":"#concise-style-line-scss"}]},{"begin":"^(\\s*)(?=(?:html-)?style\\b[^\\s]*\\.[tj]s\\b)","while":"(?=^(?:\\s*[})\\]`]|\\*/|\\s*$|\\1\\s+(\\S|$)))","patterns":[{"include":"#concise-open-tag-content"},{"include":"#concise-script-block"},{"include":"#concise-script-line"}]},{"begin":"^(\\s*)(?=(?:html-)?style\\b)","while":"(?=^(?:\\s*[})\\]`]|\\*/|\\s*$|\\1\\s+(\\S|$)))","patterns":[{"include":"#concise-open-tag-content"},{"include":"#concise-style-block"},{"include":"#concise-style-line"}]},{"begin":"^(\\s*)(?=(?:html-)?script\\b)","while":"(?=^(?:\\s*[})\\]`]|\\*/|\\s*$|\\1\\s+(\\S|$)))","patterns":[{"include":"#concise-open-tag-content"},{"include":"#concise-script-block"},{"include":"#concise-script-line"}]},{"begin":"^([ \\t]*)(?=[a-zA-Z0-9_$@.#])","while":"(?=^(?:\\s*[})\\]`]|\\*/|\\s*$|\\1\\s+(\\S|$)))","patterns":[{"include":"#concise-open-tag-content"},{"include":"#content-concise-mode"}]}]}]},"content-embedded-comment":{"patterns":[{"include":"#placeholder"},{"name":"comment.block.marko","match":"."}]},"content-embedded-script":{"name":"meta.embedded.ts","patterns":[{"include":"#placeholder"},{"include":"source.ts"}]},"content-embedded-style":{"name":"meta.embedded.css","patterns":[{"include":"#placeholder"},{"include":"source.css"}]},"content-embedded-style-less":{"name":"meta.embedded.css.less","patterns":[{"include":"#placeholder"},{"include":"source.css.less"}]},"content-embedded-style-scss":{"name":"meta.embedded.css.scss","patterns":[{"include":"#placeholder"},{"include":"source.css.scss"}]},"content-html-mode":{"patterns":[{"include":"#scriptlet"},{"include":"#cdata"},{"include":"#doctype"},{"include":"#declaration"},{"include":"#javascript-comments-after-whitespace"},{"include":"#html-comment"},{"include":"#invalid-close-tag"},{"include":"#tag-html"},{"name":"text.marko","match":"\\\\."},{"include":"#placeholder"},{"name":"text.marko","match":".+?"}]},"declaration":{"name":"meta.tag.metadata.processing.xml.marko","begin":"(\u003c\\?)\\s*([a-zA-Z0-9_$-]*)","end":"(\\??\u003e)","patterns":[{"match":"((?:[^\\s=?\u003e]+|\\?(?!\u003e))+)(=)(?:(\"(?:[^\"\\\\]+|\\\\.)*\")|('(?:[^'\\\\]+|\\\\.)*')|((?:[^\\s?\u003e]+|\\?(?!\u003e))+))","captures":{"1":{"name":"entity.other.attribute-name.marko"},"2":{"name":"punctuation.separator.key-value.html"},"3":{"name":"string.quoted.double.marko"},"4":{"name":"string.quoted.single.marko"},"5":{"name":"string.unquoted.marko"}}}],"captures":{"1":{"name":"punctuation.definition.tag.marko"},"2":{"name":"entity.name.tag.marko"}}},"doctype":{"name":"meta.tag.metadata.doctype.marko","begin":"\\s*\u003c!(?=(?i:DOCTYPE\\s))","end":"\u003e","patterns":[{"name":"entity.name.tag.marko","match":"\\G(?i:DOCTYPE)"},{"name":"string.quoted.double.marko","begin":"\"","end":"\""},{"name":"entity.other.attribute-name.marko","match":"[^\\s\u003e]+"}],"beginCaptures":{"0":{"name":"punctuation.definition.tag.begin.marko"}},"endCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}}},"html-args-or-method":{"patterns":[{"include":"#tag-type-params"},{"name":"meta.embedded.ts","contentName":"source.ts","begin":"\\s*(?=\\()","end":"(?\u003c=\\))","patterns":[{"include":"source.ts#paren-expression"}]},{"name":"meta.embedded.ts","contentName":"source.ts","begin":"(?\u003c=\\))\\s*(?={)","end":"(?\u003c=})","patterns":[{"include":"source.ts"}]}]},"html-comment":{"name":"comment.block.marko","begin":"\\s*(\u003c!(--)?)","end":"\\2\u003e","beginCaptures":{"1":{"name":"punctuation.definition.comment.marko"}},"endCaptures":{"0":{"name":"punctuation.definition.comment.marko"}}},"invalid":{"name":"invalid.illegal.character-not-allowed-here.marko","match":"\\S"},"invalid-close-tag":{"name":"invalid.illegal.character-not-allowed-here.marko","begin":"\\s*\u003c/.*?","end":"\u003e"},"javascript-comments":{"patterns":[{"contentName":"source.ts","begin":"\\s*(?=/\\*)","end":"(?\u003c=\\*/)","patterns":[{"include":"source.ts"}]},{"contentName":"source.ts","match":"\\s*//.*$","captures":{"0":{"patterns":[{"include":"source.ts"}]}}}]},"javascript-comments-after-whitespace":{"patterns":[{"contentName":"source.ts","begin":"(?:^|\\s+)(?=/\\*)","end":"(?\u003c=\\*/)","patterns":[{"include":"source.ts"}]},{"contentName":"source.ts","match":"(?:^|\\s+)//.*$","captures":{"0":{"patterns":[{"include":"source.ts"}]}}}]},"javascript-expression":{"patterns":[{"include":"#javascript-comments"},{"contentName":"source.ts","match":"(?:\\s*\\b(?:as|await|extends|in|instanceof|satisfies|keyof|new|typeof|void))+\\s+(?![:=/,;\u003e])[a-zA-Z0-9_$@#]*","captures":{"0":{"patterns":[{"include":"source.ts"}]}}},{"contentName":"source.ts","match":"(?\u003c![a-zA-Z0-9%).\u003c\\]}])\\s*/(?:[^\\\\\\[/]+|\\\\.|\\[(?:[^\\\\\\]]+|\\\\.)*\\])*/[a-zA-Z]*","captures":{"0":{"name":"string.regexp.ts","patterns":[{"include":"source.ts#regexp"},{"include":"source.ts"}]}},"applyEndPatternLast":true},{"include":"source.ts"}]},"javascript-placeholder":{"contentName":"source.ts","begin":"\\${","end":"}","patterns":[{"include":"source.ts"}],"beginCaptures":{"0":{"name":"punctuation.definition.template-expression.begin.ts"}},"endCaptures":{"0":{"name":"punctuation.definition.template-expression.end.ts"}}},"open-tag-content":{"patterns":[{"include":"#invalid-close-tag"},{"include":"#tag-before-attrs"},{"begin":"(?!/?\u003e)","end":"(?=/?\u003e)","patterns":[{"include":"#attrs"}]}]},"placeholder":{"contentName":"source.ts","begin":"\\$!?{","end":"}","patterns":[{"include":"source.ts"}],"beginCaptures":{"0":{"name":"punctuation.definition.template-expression.begin.ts"}},"endCaptures":{"0":{"name":"punctuation.definition.template-expression.end.ts"}}},"scriptlet":{"name":"meta.embedded.ts","contentName":"source.ts","begin":"^\\s*(\\$)\\s+","end":"$","patterns":[{"include":"source.ts"}],"beginCaptures":{"1":{"name":"keyword.control.scriptlet.marko"}}},"tag-before-attrs":{"patterns":[{"include":"#tag-name"},{"include":"#tag-shorthand-class-or-id"},{"name":"meta.embedded.ts","contentName":"source.ts","begin":"/(?![/*])","end":"(?=[,;(|/\u003e\u003c]|:?=|\\s+[^:]|$)","patterns":[{"name":"variable.other.constant.object.ts","match":"[a-zA-Z$_][0-9a-zA-Z$_]*"},{"begin":"{","end":"}","patterns":[{"include":"source.ts#object-binding-element"},{"include":"#javascript-expression"}],"captures":{"0":{"name":"punctuation.definition.binding-pattern.object.ts"}}},{"begin":"\\[","end":"]","patterns":[{"include":"source.ts#array-binding-element"},{"include":"#javascript-expression"}],"captures":{"0":{"name":"punctuation.definition.binding-pattern.array.ts"}}},{"begin":"\\s*(:)(?!=)","end":"(?=[,;\\](]|/\u003e|(?\u003c=[^=\u003e])\u003e|(?\u003c!^|[!~*%\u0026^|?:]|[!~*%\u0026^|?/\u003c\u003e+=-]=|[=\u003e]\u003e|[^.]\\.|[^-]-|[^+]\\+|[a-zA-Z0-9%).\u003c\\]}]\\s/|[^.$\\w]await|[^.$\\w]async|[^.$\\w]class|[^.$\\w]function|[^.$\\w]keyof|[^.$\\w]new|[^.$\\w]readonly|[^.$\\w]infer|[^.$\\w]typeof|[^.$\\w]void)\\s+(?![\\n{+!~*%\u0026^|?:]|[\u003c\u003e/=-]=|[=\u003e]\u003e|\\.[^.]|-[^-]|/[^\u003e]|(?:in|instanceof|satisfies|as|extends)\\s+[^:=/,;\u003e]))","patterns":[{"include":"source.ts#type"},{"include":"#javascript-expression"}],"beginCaptures":{"1":{"name":"keyword.operator.type.annotation.ts"}}},{"include":"#javascript-expression"}],"beginCaptures":{"0":{"name":"punctuation.separator.tag-variable.marko"}}},{"contentName":"source.ts","begin":"\\s*\\|","end":"\\|","patterns":[{"include":"source.ts#comment"},{"include":"source.ts#string"},{"include":"source.ts#decorator"},{"include":"source.ts#destructuring-parameter"},{"include":"source.ts#parameter-name"},{"name":"meta.type.annotation.ts","begin":"(:)","end":"(?=[,|])|(?==[^\u003e])","patterns":[{"include":"source.ts#type"}],"beginCaptures":{"1":{"name":"keyword.operator.type.annotation.ts"}}},{"include":"source.ts#variable-initializer"},{"name":"punctuation.separator.parameter.ts","match":","},{"include":"source.ts"}],"beginCaptures":{"0":{"name":"punctuation.section.scope.begin.marko"}},"endCaptures":{"0":{"name":"punctuation.section.scope.end.marko"}}},{"include":"#html-args-or-method"},{"include":"#attr-value"}]},"tag-html":{"patterns":[{"begin":"\\s*(\u003c)(?=(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr|const|debug|id|let|lifecycle|log|return)\\b)","end":"/?\u003e","patterns":[{"include":"#open-tag-content"}],"beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"}},"endCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}}},{"begin":"\\s*(\u003c)(?=html-comment\\b)","end":"/\u003e|(?\u003c=\u003c/\u003e|\u003c/html-comment\u003e)","patterns":[{"include":"#open-tag-content"},{"begin":"\u003e","end":"\\s*(?:\u003c/\u003e|\u003c/html-comment\u003e)","patterns":[{"include":"#content-embedded-comment"}],"beginCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}},"endCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"},"2":{"patterns":[{"include":"#tag-name"}]},"3":{"name":"punctuation.definition.tag.end.marko"}}}],"beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"}},"endCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}}},{"begin":"\\s*(\u003c)(?=((?:html-)?style)\\b[^\\s]*\\.less\\b)","end":"/\u003e|(?\u003c=\u003c/\u003e|\u003c/\\2\u003e)","patterns":[{"include":"#open-tag-content"},{"contentName":"source.less","begin":"\u003e","end":"\\s*(\u003c/)((?:html-)?style)?(\u003e)","patterns":[{"include":"#content-embedded-style-less"}],"beginCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}},"endCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"},"2":{"patterns":[{"include":"#tag-name"}]},"3":{"name":"punctuation.definition.tag.end.marko"}}}],"beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"}},"endCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}}},{"begin":"\\s*(\u003c)(?=((?:html-)?style)\\b[^\\s]*\\.scss\\b)","end":"/\u003e|(?\u003c=\u003c/\u003e|\u003c/\\2\u003e)","patterns":[{"include":"#open-tag-content"},{"contentName":"source.scss","begin":"\u003e","end":"\\s*(\u003c/)((?:html-)?style)?(\u003e)","patterns":[{"include":"#content-embedded-style-scss"}],"beginCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}},"endCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"},"2":{"patterns":[{"include":"#tag-name"}]},"3":{"name":"punctuation.definition.tag.end.marko"}}}],"beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"}},"endCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}}},{"begin":"\\s*(\u003c)(?=((?:html-)?style)\\b[^\\s]*\\.[tj]s\\b)","end":"/\u003e|(?\u003c=\u003c/\u003e|\u003c/\\2\u003e)","patterns":[{"include":"#open-tag-content"},{"contentName":"source.ts","begin":"\u003e","end":"\\s*(\u003c/)((?:html-)?style)?(\u003e)","patterns":[{"include":"#content-embedded-script"}],"beginCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}},"endCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"},"2":{"patterns":[{"include":"#tag-name"}]},"3":{"name":"punctuation.definition.tag.end.marko"}}}],"beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"}},"endCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}}},{"begin":"\\s*(\u003c)(?=((?:html-)?style)\\b)","end":"/\u003e|(?\u003c=\u003c/\u003e|\u003c/\\2\u003e)","patterns":[{"include":"#open-tag-content"},{"contentName":"source.css","begin":"\u003e","end":"\\s*(\u003c/)((?:html-)?style)?(\u003e)","patterns":[{"include":"#content-embedded-style"}],"beginCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}},"endCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"},"2":{"patterns":[{"include":"#tag-name"}]},"3":{"name":"punctuation.definition.tag.end.marko"}}}],"beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"}},"endCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}}},{"begin":"\\s*(\u003c)(?=((?:html-)?script)\\b)","end":"/\u003e|(?\u003c=\u003c/\u003e|\u003c/\\2\u003e)","patterns":[{"include":"#open-tag-content"},{"contentName":"source.ts","begin":"\u003e","end":"\\s*(\u003c/)((?:html-)?script)?(\u003e)","patterns":[{"include":"#content-embedded-script"}],"beginCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}},"endCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"},"2":{"patterns":[{"include":"#tag-name"}]},"3":{"name":"punctuation.definition.tag.end.marko"}}}],"beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"}},"endCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}}},{"begin":"\\s*(\u003c)(?=[.#$]|([a-zA-Z0-9_$@-]+))","end":"/\u003e|(?\u003c=\u003c/\u003e|\u003c/\\2\u003e)","patterns":[{"include":"#open-tag-content"},{"begin":"\u003e","end":"\\s*(\u003c/)([a-zA-Z0-9_$:@.#-]+)?(.*?)(\u003e)","patterns":[{"include":"#content-html-mode"}],"beginCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}},"endCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"},"2":{"patterns":[{"include":"#tag-name"},{"include":"#tag-shorthand-class-or-id"}]},"3":{"patterns":[{"include":"#invalid"}]},"4":{"name":"punctuation.definition.tag.end.marko"}}}],"beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.marko"}},"endCaptures":{"0":{"name":"punctuation.definition.tag.end.marko"}}}]},"tag-name":{"patterns":[{"begin":"\\G(style)\\b(\\.[a-zA-Z0-9$_-]+(?:\\.[a-zA-Z0-9$_-]+)*)|([a-zA-Z0-9_@](?:[a-zA-Z0-9_@-]+|:(?!=))*)","end":"(?=.)","patterns":[{"include":"#tag-type-args"}],"beginCaptures":{"1":{"name":"support.type.builtin.marko"},"2":{"name":"storage.type.marko.css"},"3":{"patterns":[{"name":"support.type.builtin.marko","match":"(script|style|html-script|html-style|html-comment)(?=\\b)(?![-:@])"},{"name":"keyword.control.flow.marko","match":"(for|if|while|else-if|else|try|await|return)(?=\\b)(?![-:@])"},{"name":"support.function.marko","match":"(const|context|debug|define|id|let|log|lifecycle)(?=\\b)(?![-:@])"},{"name":"entity.other.attribute-name.marko","match":"@.+"},{"name":"entity.name.tag.marko","match":".+"}]}},"applyEndPatternLast":true},{"begin":"(?=[a-zA-Z0-9$_]|-[^-])","end":"(?=[^a-zA-Z0-9$_-]|$)","patterns":[{"include":"#javascript-placeholder"},{"name":"entity.name.tag.marko","match":"(?:[a-zA-Z0-9_-]+|\\$(?!{))+"}]}]},"tag-shorthand-class-or-id":{"begin":"(?=[#.])","end":"$|(?=--|[^a-zA-Z0-9_$#.-])","patterns":[{"include":"#javascript-placeholder"},{"name":"entity.other.attribute-name.marko","match":"(?:[#.a-zA-Z0-9_-]+|\\$(?!{))+"}]},"tag-type-args":{"name":"meta.embedded.ts","contentName":"source.ts","begin":"(?=\u003c)","end":"(?\u003c=\u003e)","patterns":[{"begin":"(?\u003c=\u003e)(?=[ \t]*\u003c)","end":"(?=.)","patterns":[{"include":"#tag-type-params"}],"applyEndPatternLast":true},{"include":"source.ts#type-arguments"}],"applyEndPatternLast":true},"tag-type-params":{"name":"meta.embedded.ts","contentName":"source.ts","begin":"(?!^)[ \t]*(?=\u003c)","end":"(?\u003c=\u003e)","patterns":[{"include":"source.ts#type-parameters"}],"applyEndPatternLast":true}}}
|
data/grammars/text.slim.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"name":"Ruby Slim","scopeName":"text.slim","patterns":[{"name":"text.ruby.filter.slim","begin":"^(\\s*)(ruby):$","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"include":"source.ruby"}],"beginCaptures":{"2":{"name":"constant.language.name.ruby.filter.slim"}}},{"name":"source.js.filter.slim","begin":"^(\\s*)(javascript):$","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"include":"source.js"}],"beginCaptures":{"2":{"name":"constant.language.name.javascript.filter.slim"}}},{"name":"source.yaml.meta.slim","begin":"^(---)\\s*\\n","end":"^(---)\\s*\\n","patterns":[{"include":"source.yaml"}],"beginCaptures":{"1":{"name":"storage.frontmatter.slim"}},"endCaptures":{"1":{"name":"storage.frontmatter.slim"}}},{"name":"text.coffeescript.filter.slim","begin":"^(\\s*)(coffee):$","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"include":"source.coffee"}],"beginCaptures":{"2":{"name":"constant.language.name.coffeescript.filter.slim"}}},{"name":"text.markdown.filter.slim","begin":"^(\\s*)(markdown):$","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"include":"source.gfm"}],"beginCaptures":{"2":{"name":"constant.language.name.markdown.filter.slim"}}},{"name":"text.css.filter.slim","begin":"^(\\s*)(css):$","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"include":"source.css"}],"beginCaptures":{"2":{"name":"constant.language.name.css.filter.slim"}}},{"name":"text.sass.filter.slim","begin":"^(\\s*)(sass):$","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"include":"source.sass"}],"beginCaptures":{"2":{"name":"constant.language.name.sass.filter.slim"}}},{"name":"text.scss.filter.slim","begin":"^(\\s*)(scss):$","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"include":"source.css.scss"}],"beginCaptures":{"2":{"name":"constant.language.name.scss.filter.slim"}}},{"name":"text.less.filter.slim","begin":"^(\\s*)(less):$","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"include":"source.css.less"}],"beginCaptures":{"2":{"name":"constant.language.name.less.filter.slim"}}},{"name":"text.erb.filter.slim","begin":"^(\\s*)(erb):$","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"include":"text.html.erb"}],"beginCaptures":{"2":{"name":"constant.language.name.erb.filter.slim"}}},{"name":"meta.prolog.slim","match":"^(! )($|\\s.*)","captures":{"1":{"name":"punctuation.definition.prolog.slim"}}},{"name":"comment.block.slim","begin":"^(\\s*)(/)\\s*.*$","end":"^(?!(\\1\\s)|\\s*$)","beginCaptures":{"2":{"name":"comment.line.slash.slim"}}},{"begin":"^\\s*(?=-)","end":"$","patterns":[{"include":"#rubyline"}]},{"begin":"(?==+|~)","end":"$","patterns":[{"include":"#rubyline"}]},{"include":"#tag-attribute"},{"include":"#embedded-ruby"},{"begin":"^(\\s*)(\\||')\\s*","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"include":"text.html.basic"},{"include":"#embedded-ruby"}]},{"name":"meta.tag","begin":"^\\s*(\\.|#|[-a-zA-Z0-9]+)([\\w-]+)?","end":"$|(?!\\.|#|:|-|~|/|\\}|\\]|\\*|\\s?[\\*\\{])","patterns":[{"name":"entity.name.tag.slim","begin":"(:[\\w\\d]+)+","end":"$|\\s"},{"begin":"(:\\s)(\\.|#|[a-zA-Z0-9]+)([\\w-]+)?","end":"$|(?!\\.|#|=|-|~|/|\\}|\\]|\\*|\\s?[\\*\\{])","patterns":[{"include":"#root-class-id-tag"},{"include":"#tag-attribute"}],"captures":{"1":{"name":"punctuation.definition.tag.end.slim"},"2":{"name":"entity.name.tag.slim"},"3":{"name":"entity.other.attribute-name.event.slim"}}},{"name":"source.ruby.embedded.slim","begin":"(\\*\\{)(?=.*\\}|.*\\|\\s*$)","end":"(\\})|$|^(?!.*\\|\\s*$)","patterns":[{"include":"#embedded-ruby"}],"beginCaptures":{"1":{"name":"punctuation.section.embedded.ruby"}},"endCaptures":{"1":{"name":"punctuation.section.embedded.ruby"}}},{"include":"#root-class-id-tag"},{"include":"#rubyline"},{"name":"punctuation.terminator.tag.slim","match":"/"}],"captures":{"1":{"name":"entity.name.tag.slim"},"2":{"name":"entity.other.attribute-name.event.slim"}}},{"match":"^\\s*(\\\\.)","captures":{"1":{"name":"meta.escape.slim"}}},{"begin":"^\\s*(?=\\||')","end":"$","patterns":[{"include":"#embedded-ruby"},{"include":"text.html.basic"}]},{"begin":"(?=\u003c[\\w\\d\\:]+)","end":"$|\\/\\\u003e","patterns":[{"include":"text.html.basic"}]}],"repository":{"continuation":{"match":"([\\\\,])\\s*\\n","captures":{"1":{"name":"punctuation.separator.continuation.slim"}}},"delimited-ruby-a":{"name":"source.ruby.embedded.slim","begin":"=\\(","end":"\\)(?=( \\w|$))","patterns":[{}]},"delimited-ruby-b":{"name":"source.ruby.embedded.slim","begin":"=\\[","end":"\\](?=( \\w|$))","patterns":[{}]},"delimited-ruby-c":{"name":"source.ruby.embedded.slim","begin":"=\\{","end":"\\}(?=( \\w|$))","patterns":[{}]},"embedded-ruby":{"name":"source.ruby.embedded.html","begin":"(?\u003c!\\\\)#\\{{1,2}","end":"\\}{1,2}","patterns":[{}],"beginCaptures":{"0":{"name":"punctuation.section.embedded.ruby"}},"endCaptures":{"0":{"name":"punctuation.section.embedded.ruby"}}},"entities":{"patterns":[{"name":"constant.character.entity.html","match":"(\u0026)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)","captures":{"1":{"name":"punctuation.definition.entity.html"},"3":{"name":"punctuation.definition.entity.html"}}},{"name":"invalid.illegal.bad-ampersand.html","match":"\u0026"}]},"interpolated-ruby":{"name":"source.ruby.embedded.html","begin":"=(?=\\b)","end":"\\s|\\w$"},"root-class-id-tag":{"match":"(\\.|#)([\\w\\d\\-]+)","captures":{"1":{"name":"punctuation.separator.key-value.html"},"2":{"name":"entity.other.attribute-name.html"}}},"rubyline":{"name":"meta.line.ruby.slim","contentName":"source.ruby.embedded.slim","begin":"(==|=)(\u003c\u003e|\u003e\u003c|\u003c'|'\u003c|\u003c|\u003e)?|-","end":"(do\\s*\\n$)|(?\u003c!\\\\|,|,\\n|\\\\\\n)$","patterns":[{"name":"comment.line.number-sign.ruby","match":"#.*$"},{"include":"#continuation"},{}],"endCaptures":{"1":{"name":"keyword.control.start-block.ruby"}}},"string-double-quoted":{"name":"string.quoted.double.html","contentName":"meta.toc-list.id.html","begin":"(\")(?=.*\")","end":"\"","patterns":[{"include":"#embedded-ruby"},{"include":"#entities"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.html"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.html"}}},"string-single-quoted":{"name":"string.quoted.single.html","contentName":"meta.toc-list.id.html","begin":"(')(?=.*')","end":"'","patterns":[{"include":"#embedded-ruby"},{"include":"#entities"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.html"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.html"}}},"tag-attribute":{"name":"meta.attribute-with-value.slim","begin":"([\\w.#_-]+)(=)(?!\\s)(true|false|nil)?(\\s*\\(|\\{)?","end":"\\}|\\)|$","patterns":[{"include":"#tag-stuff"},{"include":"#string-double-quoted"},{"include":"#string-single-quoted"}],"captures":{"1":{"name":"entity.other.attribute-name.event.slim"},"2":{"name":"punctuation.separator.key-value.html"},"3":{"name":"constant.language.slim"}}},"tag-stuff":{"patterns":[{"include":"#tag-attribute"},{"include":"#interpolated-ruby"},{"include":"#delimited-ruby-a"},{"include":"#delimited-ruby-b"},{"include":"#delimited-ruby-c"},{"include":"#rubyline"},{"include":"#embedded-ruby"}]}}}
|
1
|
+
{"name":"Slim","scopeName":"text.slim","patterns":[{"name":"meta.filter.slim source.ruby.embedded.slim","begin":"^(\\s*)(ruby):$","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"include":"source.ruby"}],"beginCaptures":{"2":{"name":"constant.language.name.ruby.filter.slim"}}},{"name":"meta.filter.slim source.js.embedded.slim","begin":"^(\\s*)(javascript).*:$","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"include":"source.js"}],"beginCaptures":{"2":{"name":"constant.language.name.javascript.filter.slim"}}},{"name":"meta.filter.slim source.coffee.embedded.slim","begin":"^(\\s*)(coffee).*:$","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"include":"source.coffee"}],"beginCaptures":{"2":{"name":"constant.language.name.coffeescript.filter.slim"}}},{"name":"meta.filter.slim text.html.markdown.embedded.slim","begin":"^(\\s*)(markdown):$","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"include":"source.gfm"}],"beginCaptures":{"2":{"name":"constant.language.name.markdown.filter.slim"}}},{"name":"meta.filter.slim source.css.embedded.slim","begin":"^(\\s*)(css).*:$","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"include":"source.css"}],"beginCaptures":{"2":{"name":"constant.language.name.css.filter.slim"}}},{"name":"meta.filter.slim source.sass.embedded.slim","begin":"^(\\s*)(sass).*:$","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"include":"source.sass"}],"beginCaptures":{"2":{"name":"constant.language.name.sass.filter.slim"}}},{"name":"meta.filter.slim source.scss.embedded.slim","begin":"^(\\s*)(scss).*:$","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"include":"source.css.scss"}],"beginCaptures":{"2":{"name":"constant.language.name.scss.filter.slim"}}},{"name":"meta.filter.slim source.less.embedded.slim","begin":"^(\\s*)(less).*:$","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"include":"source.css.less"}],"beginCaptures":{"2":{"name":"constant.language.name.less.filter.slim"}}},{"name":"meta.filter.slim text.html.erb.embedded.slim","begin":"^(\\s*)(erb):$","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"include":"text.html.erb"}],"beginCaptures":{"2":{"name":"constant.language.name.erb.filter.slim"}}},{"name":"comment.block.html.slim","begin":"^(\\s*)((/!)\\s*.*)$","end":"^(?!(\\1\\s)|\\s*$)","beginCaptures":{"2":{"name":"comment.line.slash.slim"},"3":{"name":"punctuation.definition.comment.slim"}}},{"name":"comment.block.slim","begin":"^(\\s*)((/)((\\[).*(\\])).*)$","end":"^(?!(\\1\\s)|\\s*$)","beginCaptures":{"2":{"name":"comment.line.slash.slim"},"3":{"name":"punctuation.definition.comment.slim"},"4":{"name":"meta.brackets.slim"},"5":{"name":"punctuation.section.brackets.begin.slim"},"6":{"name":"punctuation.section.brackets.end.slim"}}},{"name":"comment.block.slim","begin":"^(\\s*)((/)\\s*.*)$","end":"^(?!(\\1\\s)|\\s*$)","beginCaptures":{"2":{"name":"comment.line.slash.slim"},"3":{"name":"punctuation.definition.comment.slim"}}},{"begin":"^\\s*(?=-)","end":"$","patterns":[{"include":"#rubyline"}]},{"begin":"^\\s*(?==+|~)","end":"$","patterns":[{"include":"#rubyline"}]},{"include":"#splat-attribute"},{"include":"#interpolated-ruby"},{"include":"#verbatim-text"},{"match":"^\\s*(doctype)\\s+.*(\\n|$)","captures":{"0":{"name":"meta.tag.sgml.doctype.slim"}}},{"name":"meta.tag.slim","begin":"(\\s*)(?:([\\w-]+)|(\\.)((?:[\\w-]|(?::(?!\\s)))+(?:/\\d+)?)|(#)((?:[\\w-]|(?::(?!\\s)))+(?:/\\d+)?))","end":"$|(:)(?=\\s)","patterns":[{"include":"#xml-namespace"},{"include":"#class-id-shortcut"},{"include":"#attribute-wrapper"},{"include":"#splat-attribute"},{"include":"#whitespace-modifier"},{"include":"#rubyline"},{"include":"#tag-attribute"},{"include":"#whitespace"},{"include":"#closed-tag-terminator"},{"include":"#inline-text"}],"beginCaptures":{"2":{"name":"entity.name.tag.slim"},"3":{"name":"punctuation.definition.attribute.class.slim"},"4":{"name":"entity.other.attribute-name.class.html"},"5":{"name":"punctuation.definition.attribute.id.slim"},"6":{"name":"entity.other.attribute-name.id.html"}},"endCaptures":{"1":{"name":"punctuation.definition.tag.end.slim"}}},{"match":"^\\s*(\\\\.)","captures":{"1":{"name":"meta.escape.slim"}}},{"include":"#inline-text"}],"repository":{"attribute-wrapper":{"patterns":[{"include":"#attribute-wrapper-parens"},{"include":"#attribute-wrapper-brackets"},{"include":"#attribute-wrapper-braces"}]},"attribute-wrapper-braces":{"name":"meta.braces.slim","begin":"\\{","end":"\\}","patterns":[{"include":"#tag-attribute-wrapped"},{"include":"#tag-boolean-attribute"}],"beginCaptures":{"0":{"name":"punctuation.section.braces.begin.slim"}},"endCaptures":{"0":{"name":"punctuation.section.braces.end.slim"}}},"attribute-wrapper-brackets":{"name":"meta.brackets.slim","begin":"\\[","end":"\\]","patterns":[{"include":"#tag-attribute-wrapped"},{"include":"#tag-boolean-attribute"}],"beginCaptures":{"0":{"name":"punctuation.section.brackets.begin.slim"}},"endCaptures":{"0":{"name":"punctuation.section.brackets.end.slim"}}},"attribute-wrapper-parens":{"name":"meta.parens.slim","begin":"\\(","end":"\\)","patterns":[{"include":"#tag-attribute-wrapped"},{"include":"#tag-boolean-attribute"}],"beginCaptures":{"0":{"name":"punctuation.section.parens.begin.slim"}},"endCaptures":{"0":{"name":"punctuation.section.parens.end.slim"}}},"boolean-attribute-value":{"name":"constant.language.slim","begin":"true|false|nil","end":"(?=\\s)|$"},"class-id-shortcut":{"patterns":[{"include":"#class-shortcut"},{"include":"#id-shortcut"}]},"class-shortcut":{"match":"(\\.)((?:[\\w-]|(?::(?!\\s)))+(?:/\\d+)?)","captures":{"1":{"name":"punctuation.definition.attribute.class.slim"},"2":{"name":"entity.other.attribute-name.class.html"}}},"closed-tag-terminator":{"name":"punctuation.terminator.tag.slim","match":"\\s*/\\s*"},"continuation":{"match":"([\\\\,])\\s*\\n","captures":{"1":{"name":"punctuation.separator.continuation.slim"}}},"delimited-ruby-group":{"name":"meta.embedded.slim meta.string.ruby source.ruby.embedded.slim entity.other.slim.ruby-attribute-delimited","contentName":"meta.source.ruby","begin":"\\(","end":"(\\))(?=(\\s|\\]|\\}$))","patterns":[{"include":"source.ruby"}],"beginCaptures":{"0":{"name":"punctuation.definition.group.begin.slim"}},"endCaptures":{"1":{"name":"punctuation.definition.group.end.slim"}}},"entities":{"patterns":[{"name":"constant.character.entity.html","match":"(\u0026)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)","captures":{"1":{"name":"punctuation.definition.entity.html"},"3":{"name":"punctuation.definition.entity.html"}}},{"name":"invalid.illegal.bad-ampersand.html","match":"\u0026"}]},"id-shortcut":{"match":"(#)((?:[\\w-]|(?::(?!\\s)))+(?:/\\d+)?)","captures":{"1":{"name":"punctuation.definition.attribute.id.slim"},"2":{"name":"entity.other.attribute-name.id.html"}}},"inline-text":{"name":"meta.embedded.slim text.html.embedded.slim entity.other.slim.inline-text","begin":"(?=.)","end":"(?\u003c!\\\\\\n)$","patterns":[{"include":"text.html.basic"},{"include":"#interpolated-ruby"},{"match":"([^#\u003c]|\\\\#|\\\\\\\u003c)*\\n"}]},"interpolated-ruby":{"name":"meta.interpolation.slim meta.string.ruby source.ruby.embedded.slim","begin":"(?\u003c!\\\\)#\\{{1,2}","end":"\\}{1,2}","patterns":[{"include":"source.ruby"}],"beginCaptures":{"0":{"name":"punctuation.section.interpolation.begin.slim"}},"endCaptures":{"0":{"name":"punctuation.section.interpolation.end.slim"}}},"ruby-attribute-array":{"name":"meta.embedded.slim meta.string.ruby source.ruby.embedded.slim entity.other.slim.ruby-attribute-array","begin":"(?=\\[)","end":"(?\u003c=\\])","patterns":[{"include":"source.ruby"}]},"ruby-attribute-hash":{"name":"meta.embedded.slim meta.string.ruby source.ruby.embedded.slim entity.other.slim.ruby-attribute-hash","begin":"(?=\\{)","end":"(?\u003c=\\})","patterns":[{"include":"source.ruby"}]},"ruby-attribute-symbol-array":{"name":"meta.embedded.slim meta.string.ruby source.ruby.embedded.slim entity.other.slim.ruby-attribute-symbol-array","begin":"=?(?=:)","end":"(?=\\s|\\)|\\]|\\})|$","patterns":[{"include":"source.ruby"}]},"ruby-attribute-value":{"name":"meta.embedded.slim meta.string.ruby source.ruby.embedded.slim entity.other.slim.ruby-attribute-value","begin":"(?=\\b)","end":"(?=\\s)|$","patterns":[{"include":"source.ruby"}],"beginCaptures":{"1":{"name":"punctuation.separator.key-value.slim"}}},"ruby-attribute-value-wrapped":{"name":"meta.embedded.slim meta.string.ruby source.ruby.embedded.slim entity.other.slim.ruby-attribute-value-wrapped","begin":"(?=\\b)","end":"(?=\\)|\\]|\\})|$","patterns":[{"include":"source.ruby"}],"beginCaptures":{"1":{"name":"punctuation.separator.key-value.slim"}}},"rubyline":{"name":"meta.embedded.slim meta.line.ruby.slim","contentName":"meta.embedded.slim meta.string.ruby source.ruby.embedded.slim entity.other.slim.ruby-line","begin":"(==|=)(\u003c\u003e|\u003e\u003c|\u003c'|'\u003c|\u003c|\u003e)?|-\\s*","end":"(do\\s*\\n$)|(?\u003c!\\\\|,|,\\n|\\\\\\n)$","patterns":[{"name":"comment.line.number-sign.ruby","match":"#.*$"},{"include":"#continuation"},{"include":"source.ruby"}],"beginCaptures":{"0":{"name":"punctuation.section.embedded.slim"},"2":{"name":"keyword.operator.whitespace.slim"}},"endCaptures":{"1":{"name":"keyword.control.start-block.ruby"}}},"splat-attribute":{"patterns":[{"include":"#splat-attribute-hash"},{"include":"#splat-attribute-direct"}]},"splat-attribute-direct":{"name":"meta.embedded.slim source.ruby.embedded.slim entity.other.slim.splat-attribute","begin":"\\*","end":"(?=\\s)|$","patterns":[{"include":"source.ruby"}],"beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.ruby"}}},"splat-attribute-hash":{"name":"meta.embedded.slim source.ruby.embedded.slim entity.other.slim.splat-attribute","begin":"\\*\\{","end":"\\}","patterns":[{"include":"source.ruby"}],"beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.ruby"}},"endCaptures":{"0":{"name":"punctuation.section.embedded.end.ruby"}}},"string-double-quoted":{"name":"meta.string.html string.quoted.double.html","begin":"(\")(?=.*(\"|\\\\?$))","end":"\"","patterns":[{"include":"#interpolated-ruby"},{"include":"#entities"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.html"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.html"}}},"string-single-quoted":{"name":"meta.string.html string.quoted.single.html","begin":"(')(?=.*('|\\\\$))","end":"'","patterns":[{"include":"#interpolated-ruby"},{"include":"#entities"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.html"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.html"}}},"tag-attribute":{"name":"meta.attribute-with-value.slim","begin":"([\\w-]+)\\s*(==?)\\s*","end":"(?=(?::?\\s))|$","patterns":[{"include":"#string-double-quoted"},{"include":"#string-single-quoted"},{"include":"#boolean-attribute-value"},{"include":"#delimited-ruby-group"},{"include":"#ruby-attribute-array"},{"include":"#ruby-attribute-hash"},{"include":"#ruby-attribute-symbol-array"},{"include":"#ruby-attribute-value"}],"captures":{"1":{"name":"entity.other.attribute-name.slim"},"2":{"name":"punctuation.separator.key-value.slim"}}},"tag-attribute-wrapped":{"name":"meta.attribute-with-value.slim","begin":"([\\w-]+)\\s*(==?)\\s*","end":"(?=(?:\\)|\\]|\\}))|$","patterns":[{"include":"#string-double-quoted"},{"include":"#string-single-quoted"},{"include":"#boolean-attribute-value"},{"include":"#delimited-ruby-group"},{"include":"#ruby-attribute-array"},{"include":"#ruby-attribute-hash"},{"include":"#ruby-attribute-symbol-array"},{"include":"#ruby-attribute-value-wrapped"}],"captures":{"1":{"name":"entity.other.attribute-name.slim"},"2":{"name":"punctuation.separator.key-value.slim"}}},"tag-boolean-attribute":{"name":"meta.attribute-with-value.slim entity.other.attribute-name.slim","begin":"([\\w-]+)\\s*","end":"(?=(?::?\\s|\\)|\\]|\\}))|$"},"verbatim-text":{"contentName":"text.html.embedded.slim","begin":"^(\\s*)([|'](\u003c |\u003e |\u003c\u003e |\u003e\u003c )?)\\s*","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"include":"text.html.basic"},{"include":"#interpolated-ruby"}],"beginCaptures":{"2":{"name":"punctuation.section.verbatim.slim"}}},"whitespace":{"name":"text.html.embedded.whitespace.slim","match":"\\s+"},"whitespace-modifier":{"name":"keyword.operator.whitespace.slim","match":"(?\u003c!\\s)(?:\\\u003e|\\\u003c|\\\u003c\\\u003e|\\\u003e\\\u003c)"},"xml-namespace":{"name":"entity.name.tag.slim","match":"(:[\\w-]+)+"}}}
|
data/grammars/text.srt.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"name":"SubRip Text","scopeName":"text.srt","patterns":[{"include":"#main"}],"repository":{"action":{"patterns":[{"name":"string.quoted.other.sound.action.square-brackets.srt","begin":"\\[","end":"\\]|(?=^[ \\t]*$)","patterns":[{"include":"#formatting"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.srt"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.srt"}}},{"name":"string.quoted.other.sound.action.round-brackets.srt","begin":"\\(","end":"\\)|(?=^[ \\t]*$)","patterns":[{"include":"#formatting"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.srt"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.srt"}}}]},"align":{"name":"meta.tag.override.line-alignment.srt","match":"({)(\\\\a(?:n[1-9]|(10|11|(?!4|8)\\d)))(})","captures":{"1":{"name":"punctuation.definition.tag.begin.srt"},"2":{"name":"entity.name.tag.srt"},"3":{"name":"invalid.deprecated.syntax.tag.srt"},"4":{"name":"punctuation.definition.tag.end.srt"}}},"arrow":{"name":"keyword.operator.timespan.srt","match":"--\u003e","captures":{"0":{"name":"punctuation.definition.separator.srt"}}},"bold":{"contentName":"markup.bold.srt","begin":"(\u003c)([Bb])(?=$|\u003e|\\s)([^\u003e]*)(\u003e)","end":"(\u003c/)([Bb])[ \\t]*(\u003e)|(?=^[ \\t]*$)","patterns":[{"include":"#text"}],"beginCaptures":{"0":{"name":"meta.tag.inline.b.html.srt"},"1":{"name":"punctuation.definition.tag.begin.html.srt"},"2":{"name":"entity.name.tag.inline.b.html.srt"},"3":{"patterns":[{"include":"text.html.basic#tag-stuff"}]},"4":{"name":"punctuation.definition.tag.end.html.srt"}},"endCaptures":{"0":{"name":"meta.tag.inline.b.html.srt"},"1":{"name":"punctuation.definition.tag.begin.html.srt"},"2":{"name":"entity.name.tag.inline.b.html"},"3":{"name":"punctuation.definition.tag.end.html.srt"}}},"dash":{"name":"markup.quote.quotation-dash.srt","match":"(?:^|\\G)(-)","captures":{"1":{"name":"punctuation.section.quote.srt"}}},"escapes":{"patterns":[{"name":"constant.character.whitespace.escape.hard-space.srt","match":"(\\\\)h","captures":{"1":{"name":"punctuation.definition.escape.backslash.srt"}}},{"name":"constant.character.whitespace.escape.forced-newline.srt","match":"(\\\\)N","captures":{"1":{"name":"punctuation.definition.escape.backslash.srt"}}}]},"font":{"contentName":"markup.other.font.srt","begin":"(?i)(\u003c)(font)(?=$|\u003e|\\s)([^\u003e]*)(\u003e)","end":"(?i)(\u003c/)(font)[ \\t]*(\u003e)|(?=^[ \\t]*$)","patterns":[{"include":"#text"}],"beginCaptures":{"0":{"name":"meta.tag.inline.font.html.srt"},"1":{"name":"punctuation.definition.tag.begin.html.srt"},"2":{"name":"entity.name.tag.inline.font.html.srt"},"3":{"patterns":[{"include":"text.html.basic#tag-stuff"}]},"4":{"name":"punctuation.definition.tag.end.html.srt"}},"endCaptures":{"0":{"name":"meta.tag.inline.font.html.srt"},"1":{"name":"punctuation.definition.tag.begin.html.srt"},"2":{"name":"entity.name.tag.inline.font.html.srt"},"3":{"name":"punctuation.definition.tag.end.html.srt"}}},"formatting":{"patterns":[{"include":"#bold"},{"include":"#italic"},{"include":"#underline"},{"include":"#strike"},{"include":"#font"},{"include":"#align"}]},"italic":{"contentName":"markup.italic.srt","begin":"(\u003c)([Ii])(?=$|\u003e|\\s)([^\u003e]*)(\u003e)","end":"(\u003c/)([Ii])[ \\t]*(\u003e)|(?=^[ \\t]*$)","patterns":[{"include":"#text"}],"beginCaptures":{"0":{"name":"meta.tag.inline.i.html.srt"},"1":{"name":"punctuation.definition.tag.begin.html.srt"},"2":{"name":"entity.name.tag.inline.i.html.srt"},"3":{"patterns":[{"include":"text.html.basic#tag-stuff"}]},"4":{"name":"punctuation.definition.tag.end.html.srt"}},"endCaptures":{"0":{"name":"meta.tag.inline.i.html.srt"},"1":{"name":"punctuation.definition.tag.begin.html.srt"},"2":{"name":"entity.name.tag.inline.i.html"},"3":{"name":"punctuation.definition.tag.end.html.srt"}}},"linePosition":{"name":"meta.line-position.${2:/downcase}-axis.srt","match":"\\b(([XY])[0-9]+)(:)(?:([-+]?[0-9]+\\.[0-9]+)|([-+]?[0-9]+))\\b","captures":{"1":{"name":"variable.parameter.position.srt"},"3":{"name":"keyword.operator.assignment.key-value.colon.srt"},"4":{"name":"constant.numeric.float.srt"},"5":{"name":"constant.numeric.integer.srt"}}},"lyrics":{"name":"markup.quote.lyrics.srt","begin":"(♪+)[ \\t]*","end":"[ \\t]*(♪+)|(?=^-|^[ \\t]*$|\\s*\u003c/)","patterns":[{"include":"#formatting"}],"beginCaptures":{"1":{"name":"punctuation.definition.lyrics.begin.srt"}},"endCaptures":{"1":{"name":"punctuation.definition.lyrics.end.srt"}}},"main":{"patterns":[{"include":"#subtitle"}]},"speaker":{"match":"(?:^|\\G)(-[ \\t]*)
|
1
|
+
{"name":"SubRip Text","scopeName":"text.srt","patterns":[{"include":"#main"}],"repository":{"action":{"patterns":[{"name":"string.quoted.other.sound.action.square-brackets.srt","begin":"\\[","end":"\\]|(?=^[ \\t]*$)","patterns":[{"include":"#formatting"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.srt"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.srt"}}},{"name":"string.quoted.other.sound.action.round-brackets.srt","begin":"\\(","end":"\\)|(?=^[ \\t]*$)","patterns":[{"include":"#formatting"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.srt"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.srt"}}}]},"align":{"name":"meta.tag.override.line-alignment.srt","match":"({)(\\\\a(?:n[1-9]|(10|11|(?!4|8)\\d)))(})","captures":{"1":{"name":"punctuation.definition.tag.begin.srt"},"2":{"name":"entity.name.tag.srt"},"3":{"name":"invalid.deprecated.syntax.tag.srt"},"4":{"name":"punctuation.definition.tag.end.srt"}}},"arrow":{"name":"keyword.operator.timespan.srt","match":"--\u003e","captures":{"0":{"name":"punctuation.definition.separator.srt"}}},"bold":{"contentName":"markup.bold.srt","begin":"(\u003c)([Bb])(?=$|\u003e|\\s)([^\u003e]*)(\u003e)","end":"(\u003c/)([Bb])[ \\t]*(\u003e)|(?=^[ \\t]*$)","patterns":[{"include":"#text"}],"beginCaptures":{"0":{"name":"meta.tag.inline.b.html.srt"},"1":{"name":"punctuation.definition.tag.begin.html.srt"},"2":{"name":"entity.name.tag.inline.b.html.srt"},"3":{"patterns":[{"include":"text.html.basic#tag-stuff"}]},"4":{"name":"punctuation.definition.tag.end.html.srt"}},"endCaptures":{"0":{"name":"meta.tag.inline.b.html.srt"},"1":{"name":"punctuation.definition.tag.begin.html.srt"},"2":{"name":"entity.name.tag.inline.b.html"},"3":{"name":"punctuation.definition.tag.end.html.srt"}}},"dash":{"name":"markup.quote.quotation-dash.srt","match":"(?:^|\\G)(-)","captures":{"1":{"name":"punctuation.section.quote.srt"}}},"escapes":{"patterns":[{"name":"constant.character.whitespace.escape.hard-space.srt","match":"(\\\\)h","captures":{"1":{"name":"punctuation.definition.escape.backslash.srt"}}},{"name":"constant.character.whitespace.escape.forced-newline.srt","match":"(\\\\)N","captures":{"1":{"name":"punctuation.definition.escape.backslash.srt"}}}]},"font":{"contentName":"markup.other.font.srt","begin":"(?i)(\u003c)(font)(?=$|\u003e|\\s)([^\u003e]*)(\u003e)","end":"(?i)(\u003c/)(font)[ \\t]*(\u003e)|(?=^[ \\t]*$)","patterns":[{"include":"#text"}],"beginCaptures":{"0":{"name":"meta.tag.inline.font.html.srt"},"1":{"name":"punctuation.definition.tag.begin.html.srt"},"2":{"name":"entity.name.tag.inline.font.html.srt"},"3":{"patterns":[{"include":"text.html.basic#tag-stuff"}]},"4":{"name":"punctuation.definition.tag.end.html.srt"}},"endCaptures":{"0":{"name":"meta.tag.inline.font.html.srt"},"1":{"name":"punctuation.definition.tag.begin.html.srt"},"2":{"name":"entity.name.tag.inline.font.html.srt"},"3":{"name":"punctuation.definition.tag.end.html.srt"}}},"formatting":{"patterns":[{"include":"#bold"},{"include":"#italic"},{"include":"#underline"},{"include":"#strike"},{"include":"#font"},{"include":"#align"},{"include":"#unknownTag"}]},"italic":{"contentName":"markup.italic.srt","begin":"(\u003c)([Ii])(?=$|\u003e|\\s)([^\u003e]*)(\u003e)","end":"(\u003c/)([Ii])[ \\t]*(\u003e)|(?=^[ \\t]*$)","patterns":[{"include":"#text"}],"beginCaptures":{"0":{"name":"meta.tag.inline.i.html.srt"},"1":{"name":"punctuation.definition.tag.begin.html.srt"},"2":{"name":"entity.name.tag.inline.i.html.srt"},"3":{"patterns":[{"include":"text.html.basic#tag-stuff"}]},"4":{"name":"punctuation.definition.tag.end.html.srt"}},"endCaptures":{"0":{"name":"meta.tag.inline.i.html.srt"},"1":{"name":"punctuation.definition.tag.begin.html.srt"},"2":{"name":"entity.name.tag.inline.i.html"},"3":{"name":"punctuation.definition.tag.end.html.srt"}}},"linePosition":{"name":"meta.line-position.${2:/downcase}-axis.srt","match":"\\b(([XY])[0-9]+)(:)(?:([-+]?[0-9]+\\.[0-9]+)|([-+]?[0-9]+))\\b","captures":{"1":{"name":"variable.parameter.position.srt"},"3":{"name":"keyword.operator.assignment.key-value.colon.srt"},"4":{"name":"constant.numeric.float.srt"},"5":{"name":"constant.numeric.integer.srt"}}},"lyrics":{"name":"markup.quote.lyrics.srt","begin":"(♪+)[ \\t]*","end":"[ \\t]*(♪+)|(?=^-|^[ \\t]*$|\\s*\u003c/)","patterns":[{"include":"#formatting"}],"beginCaptures":{"1":{"name":"punctuation.definition.lyrics.begin.srt"}},"endCaptures":{"1":{"name":"punctuation.definition.lyrics.end.srt"}}},"main":{"patterns":[{"include":"#subtitle"}]},"speaker":{"match":"(?x)\n(?:^|\\G)\n(-[ \\t]*)?\n(\n\t(?: [^-\u003c\u003e\\s:] [^\u003c\u003e:]* (?=:[ \\t]*\\S)\n\t| [^-\u003c\u003e\\s:a-z] [^\u003c\u003e:a-z]*\n\t| \u003c(?!/(?i:[bisu]|font)\u003e\\s*:)\n\t)++\n\t(?:\n\t\t(?=(?:\\s*\u003c/(?i:[bisu]|font)\u003e)++\\s*:)\n\t\t|\n\t\t(:)\n\t)\n)(?=$|\\s|\u003c/)","captures":{"1":{"patterns":[{"include":"#dash"}]},"2":{"name":"entity.name.speaker.srt","patterns":[{"include":"#formatting"},{"include":"#action"}]},"3":{"name":"punctuation.separator.speaker.colon.srt"}}},"strike":{"contentName":"markup.strike.srt","begin":"(\u003c)([Ss])(?=$|\u003e|\\s)([^\u003e]*)(\u003e)","end":"(\u003c/)([Ss])[ \\t]*(\u003e)|(?=^[ \\t]*$)","patterns":[{"include":"#text"}],"beginCaptures":{"0":{"name":"meta.tag.inline.s.html.srt"},"1":{"name":"punctuation.definition.tag.begin.html.srt"},"2":{"name":"entity.name.tag.inline.s.html.srt"},"3":{"patterns":[{"include":"text.html.basic#tag-stuff"}]},"4":{"name":"punctuation.definition.tag.end.html.srt"}},"endCaptures":{"0":{"name":"meta.tag.inline.s.html.srt"},"1":{"name":"punctuation.definition.tag.begin.html.srt"},"2":{"name":"entity.name.tag.inline.s.html"},"3":{"name":"punctuation.definition.tag.end.html.srt"}}},"subtitle":{"name":"meta.subtitle.srt","begin":"^(?:?)(\\d+)$","end":"^[ \\t]*$","patterns":[{"begin":"\\G\\s*","end":"(?!\\G)$","patterns":[{"name":"meta.timespan.empty.srt","contentName":"comment.block.ignored.hidden-subtitle.srt","begin":"(?x) ^\n([0-9]{2}:[0-9]{2}:[0-9]{2}[,.][0-9]{3}) \\x20(--\u003e)\\x20 (\\1)\n((?:\\s*[XY][0-9]+:[-+]?[0-9]+(?:\\.[0-9]+)?)++)?\n[ \\t]* $ ","end":"(?=^[ \\t]*$)","beginCaptures":{"1":{"name":"constant.numeric.time.timecode.start.srt","patterns":[{"include":"#timecode"}]},"2":{"patterns":[{"include":"#arrow"}]},"3":{"name":"constant.numeric.time.timecode.end.srt","patterns":[{"include":"#timecode"}]},"4":{"patterns":[{"include":"#linePosition"}]}}},{"name":"meta.timespan.srt","match":"(?x) ^\n([0-9]{2}:[0-9]{2}:[0-9]{2}[,.][0-9]{3}) \\x20(--\u003e)\\x20\n([0-9]{2}:[0-9]{2}:[0-9]{2}[,.][0-9]{3})\n((?:\\s*[XY][0-9]+:[-+]?[0-9]+(?:\\.[0-9]+)?)++)?\n[ \\t]* $ ","captures":{"1":{"name":"constant.numeric.time.timecode.start.srt","patterns":[{"include":"#timecode"}]},"2":{"patterns":[{"include":"#arrow"}]},"3":{"name":"constant.numeric.time.timecode.end.srt","patterns":[{"include":"#timecode"}]},"4":{"patterns":[{"include":"#linePosition"}]}}},{"include":"#text"}]},{"include":"#text"}],"beginCaptures":{"1":{"name":"entity.name.section.srt"}}},"text":{"patterns":[{"include":"#speaker"},{"include":"#dash"},{"include":"#action"},{"include":"#lyrics"},{"include":"#formatting"},{"include":"#escapes"}]},"timecode":{"patterns":[{"name":"invalid.illegal.syntax.decimal-separator.srt","match":"\\."},{"name":"invalid.illegal.value.out-of-range.vtt","match":"(?\u003c=:)([6-9][0-9])"}]},"underline":{"contentName":"markup.underline.srt","begin":"(\u003c)([Uu])(?=$|\u003e|\\s)([^\u003e]*)(\u003e)","end":"(\u003c/)([Uu])[ \\t]*(\u003e)|(?=^[ \\t]*$)","patterns":[{"include":"#text"}],"beginCaptures":{"0":{"name":"meta.tag.inline.u.html.srt"},"1":{"name":"punctuation.definition.tag.begin.html.srt"},"2":{"name":"entity.name.tag.inline.u.html.srt"},"3":{"patterns":[{"include":"text.html.basic#tag-stuff"}]},"4":{"name":"punctuation.definition.tag.end.html.srt"}},"endCaptures":{"0":{"name":"meta.tag.inline.u.html.srt"},"1":{"name":"punctuation.definition.tag.begin.html.srt"},"2":{"name":"entity.name.tag.inline.u.html"},"3":{"name":"punctuation.definition.tag.end.html.srt"}}},"unknownTag":{"name":"meta.tag.override.unsupported.srt","match":"({)(?:.:[^}]*|\\\\[^}]*)(})","captures":{"0":{"name":"invalid.unimplemented.syntax.tag.srt"},"1":{"name":"punctuation.definition.tag.begin.srt"},"2":{"name":"punctuation.definition.tag.end.srt"}}}}}
|
@@ -1 +1 @@
|
|
1
|
-
{"scopeName":"text.valve-cfg","patterns":[{"include":"#comments"},{"include":"#function"},{"include":"#cvar"},{"include":"#value"}],"repository":{"comments":{"patterns":[{"name":"comment.valve-cfg","match":"\\/\\/.*"},{"name":"comment.block.valve-cfg","begin":"/\\*","end":"\\*/","captures":{"0":{"name":"comment.valve-cfg"}}}]},"cvar":{"patterns":[{"match":"^\\s*(\"[A-Za-z0-9_-]*\")","captures":{"1":{"name":"support.type.property-name.valve-cfg"}}},{"match":"^\\s*('[A-Za-z0-9_-]*')","captures":{"1":{"name":"support.type.property-name.valve-cfg"}}},{"match":"^\\s*([A-Za-z0-9_-]*)","captures":{"1":{"name":"support.type.property-name.valve-cfg"}}}]},"function":{"patterns":[{"name":"support.function.valve-cfg","match":"^\\s*\\b(alias|bind_osx|bind|clear|echo|execifexists|execwithwhitelist|exec|host_writeconfig_ss|host_writeconfig|key_updatelayout|playvol|say_team|say|unbindalljoystick|unbindallmousekeyboard|unbindall)","captures":{"1":{"name":"support.function.valve-cfg"}}}]},"numeric-literal":{"patterns":[{"name":"constant.numeric.float.
|
1
|
+
{"scopeName":"text.valve-cfg","patterns":[{"include":"#comments"},{"include":"#function"},{"include":"#cvar"},{"include":"#value"}],"repository":{"comments":{"patterns":[{"name":"comment.valve-cfg","match":"\\/\\/.*"},{"name":"comment.block.valve-cfg","begin":"/\\*","end":"\\*/","captures":{"0":{"name":"comment.valve-cfg"}}}]},"cvar":{"patterns":[{"match":"^\\s*(\"[A-Za-z0-9_-]*\")","captures":{"1":{"name":"support.type.property-name.valve-cfg"}}},{"match":"^\\s*('[A-Za-z0-9_-]*')","captures":{"1":{"name":"support.type.property-name.valve-cfg"}}},{"match":"^\\s*([A-Za-z0-9_-]*)","captures":{"1":{"name":"support.type.property-name.valve-cfg"}}}]},"function":{"patterns":[{"name":"support.function.valve-cfg","match":"^\\s*\\b(alias|bind_osx|bind|clear|echo|execifexists|execwithwhitelist|exec|host_writeconfig_ss|host_writeconfig|key_updatelayout|playvol|say_team|say|unbindalljoystick|unbindallmousekeyboard|unbindall)","captures":{"1":{"name":"support.function.valve-cfg"}}}]},"numeric-literal":{"patterns":[{"name":"constant.numeric.float.valve-cfg","match":"[0-9]+\\.[0-9]+"},{"name":"constant.numeric.valve-cfg","match":"\\b0b[0-1]+\\b"},{"name":"constant.numeric.valve-cfg","match":"\\b0o[0-7]+\\b"},{"name":"constant.numeric.valve-cfg","match":"\\b0x[0-9a-fA-F]+\\b"},{"name":"constant.numeric.integer.valve-cfg","match":"\\b\\d+\\b"},{"name":"invalid.illegal.constant.valve-cfg","match":"\\b\\d+\\w+\\b"}]},"strings":{"name":"string.quoted.double.valve-cfg","begin":"\"","end":"\"","patterns":[{"name":"variable","match":"\\\\."}]},"value":{"begin":".","end":"\\n","patterns":[{"include":"#numeric-literal"},{"include":"#strings"}]}}}
|
data/grammars/text.xml.svg.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"name":"SVG","scopeName":"text.xml.svg","patterns":[{"include":"#main"}],"repository":{"attr":{"name":"meta.attribute.${0:/downcase}.xml.svg","begin":"[A-Za-z_:][-\\w.:]*","end":"(?=\\s*(?:/?\u003e|[^\\s=]))|(?\u003c=[\"'])","patterns":[{"include":"#attrValueCSS"},{"include":"#attrValuePlain"}],"beginCaptures":{"0":{"patterns":[{"include":"#attrName"}]}}},"attrName":{"patterns":[{"match":"(?:^|\\G)([-\\w.]+)(:)(?=[-\\w.:])","captures":{"1":{"name":"entity.other.attribute-name.namespace.xml.svg"},"2":{"name":"punctuation.separator.namespace.xml.svg"}}},{"name":"entity.other.attribute-name.localname.xml.svg","match":"[A-Za-z_:][-\\w.:]*"}]},"attrValueCSS":{"begin":"(?i)(?\u003c=style)\\G\\s*(=)","end":"(?=\\s*(?:[%?/]?\u003e))|(?\u003c=[\"'])([^\\s\u003e]*)|(?:\\G|^)\\s*([^\\s\"'\u003e]+)","patterns":[{"match":"(?:\\G|^)\\s+(?!/?\u003e)"},{"name":"string.quoted.double.xml.svg","begin":"\"","end":"\"","patterns":[{"name":"source.css.style.xml.svg","match":"[^\"]+","captures":{"0":{"patterns":[{"include":"#entity"},{"include":"source.css#rule-list-innards"}]}}}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml.svg"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.xml.svg"}}},{"name":"string.quoted.single.xml.svg","begin":"'","end":"'","patterns":[{"name":"source.css.style.xml.svg","match":"[^']+","captures":{"0":{"patterns":[{"include":"#entity"},{"include":"source.css#rule-list-innards"}]}}}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml.svg"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.xml.svg"}}}],"beginCaptures":{"1":{"name":"punctuation.separator.key-value.xml.svg"}},"endCaptures":{"1":{"name":"invalid.illegal.syntax.xml.svg"},"2":{"name":"string.unquoted.xml.svg","patterns":[{"include":"source.css#rule-list-innards"}]}}},"attrValuePlain":{"begin":"\\s*(=)","end":"(?=\\s*(?:[%?/]?\u003e))|(?\u003c=[\"'])([^\\s\u003e]*)|(?:\\G|^)\\s*([^\\s\"'\u003e]+)","patterns":[{"match":"(?:\\G|^)\\s+(?!/?\u003e)"},{"name":"string.quoted.double.xml.svg","begin":"\"","end":"\"","patterns":[{"include":"#entity"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml.svg"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.xml.svg"}}},{"name":"string.quoted.single.xml.svg","begin":"'","end":"'","patterns":[{"include":"#entity"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml.svg"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.xml.svg"}}}],"beginCaptures":{"1":{"name":"punctuation.separator.key-value.xml.svg"}},"endCaptures":{"1":{"name":"invalid.illegal.syntax.xml.svg"},"2":{"name":"string.unquoted.xml.svg"}}},"cdata":{"name":"string.unquoted.cdata.xml.svg","begin":"\u003c!\\[CDATA\\[","end":"\\]\\]\u003e","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml.svg"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.xml.svg"}}},"commands":{"patterns":[{"name":"keyword.operator.drawing-command.xml.svg","match":"(?i)[MLHVCSQTAZ]"},{"name":"constant.numeric.number.xml.svg","match":"-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)"},{"name":"punctuation.separator.coordinates.comma.xml.svg","match":","}]},"comment":{"name":"comment.block.xml.svg","begin":"\u003c!--","end":"--\u003e","patterns":[{"name":"invalid.illegal.bad-comment.xml.svg","match":"--(?!\u003e)"}],"beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.xml.svg"}},"endCaptures":{"0":{"name":"punctuation.definition.comment.end.xml.svg"}}},"doctype":{"name":"meta.tag.sgml.doctype.xml.svg","begin":"(\u003c!)(DOCTYPE)\\s+([:a-zA-Z_][-:\\w.]*)","end":"\\s*(\u003e)","patterns":[{"include":"text.xml#internalSubset"}],"beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.xml.svg"},"2":{"name":"keyword.other.doctype.xml.svg"},"3":{"name":"variable.language.documentroot.xml.svg"}},"endCaptures":{"1":{"name":"punctuation.definition.tag.end.xml.svg"}}},"entity":{"patterns":[{"include":"text.xml#entity"},{"include":"text.xml#bare-ampersand"}]},"main":{"patterns":[{"include":"#comment"},{"include":"#cdata"},{"include":"#doctype"},{"include":"text.xml#EntityDecl"},{"include":"text.xml#parameterEntity"},{"include":"#entity"},{"include":"#preprocessor"},{"include":"#scriptTag"},{"include":"#styleTag"},{"include":"#tag"},{"include":"#unescapedBracket"},{"include":"#unmatchedTag"}]},"preprocessor":{"name":"meta.tag.preprocessor.xml.svg","begin":"(\u003c\\?)\\s*","end":"\\?\u003e","patterns":[{"begin":"\\G","end":"([-\\w]+)|(?=\\s*\\?\u003e)","endCaptures":{"1":{"name":"entity.name.tag.xml.svg"}}},{"include":"#attr"}],"beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.xml.svg"}},"endCaptures":{"0":{"name":"punctuation.definition.tag.end.xml.svg"}}},"scriptTag":{"patterns":[{"include":"#scriptTagPlain"},{"include":"#scriptTagJS"}]},"scriptTagJS":{"name":"meta.tag.script.xml.svg","begin":"(?i)(\u003c)(script)(?=$|\\s|/?\u003e)","end":"(?i)(\u003c/)(script)\\s*(\u003e)|(/\u003e)","patterns":[{"include":"#tagAttr"},{"contentName":"source.js.embedded.xml.svg","begin":"(?\u003c=\u003e)","end":"(?i)(?=\\s*\u003c/script\\s*\u003e)","patterns":[{"include":"source.js"},{"include":"#entity"}]}],"beginCaptures":{"1":{"name":"punctuation.definition.tag.opening.begin.xml.svg"},"2":{"patterns":[{"include":"#tagName"}]}},"endCaptures":{"1":{"name":"punctuation.definition.tag.closing.begin.xml.svg"},"2":{"patterns":[{"include":"#tagName"}]},"3":{"name":"punctuation.definition.tag.closing.end.xml.svg"},"4":{"name":"punctuation.definition.tag.self-closing.end.xml.svg"}}},"scriptTagPlain":{"name":"meta.tag.script.xml.svg","begin":"(?x)\n(\u003c)((?i)script)\n(\n\t\\s+[^\u003e]*?\n\t(?\u003c=\\s)(?i:type)\\s*=\\s*\n\t([\"'])?\n\t(?! module\n\t| application/(?:x-)?(?:ecma|java)script\n\t| text/\n\t\t(?: javascript(?:1.[0-5])?\n\t\t| (?:j|ecma|live)script\n\t\t| x-(?:ecma|java)script\n\t\t)\n\t)\n\t(?: (?\u003c=\")(?:[^\"\u003e]+)\"\n\t| (?\u003c=')(?:[^'\u003e]+)'\n\t| [^\\s\"'\u003e]+\n\t)\n\t(?=\\s|/?\u003e)\n)","end":"(?i)(\u003c/)(script)\\s*(\u003e)|(/\u003e)","patterns":[{"include":"#tagAttr"},{"include":"#main"}],"beginCaptures":{"1":{"name":"punctuation.definition.tag.opening.begin.xml.svg"},"2":{"patterns":[{"include":"#tagName"}]},"3":{"patterns":[{"include":"#attr"}]}},"endCaptures":{"1":{"name":"punctuation.definition.tag.closing.begin.xml.svg"},"2":{"patterns":[{"include":"#tagName"}]},"3":{"name":"punctuation.definition.tag.closing.end.xml.svg"},"4":{"name":"punctuation.definition.tag.self-closing.end.xml.svg"}}},"styleTag":{"name":"meta.tag.style.xml.svg","begin":"(?i)(\u003c)(style)(?=$|\\s|/?\u003e)","end":"(?i)(\u003c/)(style)\\s*(\u003e)|(/\u003e)","patterns":[{"include":"#tagAttr"},{"contentName":"source.css.embedded.xml.svg","begin":"(?\u003c=\u003e)","end":"(?i)(?=\\s*\u003c/style\\s*\u003e)","patterns":[{"include":"source.css"},{"include":"#entity"}]}],"beginCaptures":{"1":{"name":"punctuation.definition.tag.opening.begin.xml.svg"},"2":{"patterns":[{"include":"#tagName"}]}},"endCaptures":{"1":{"name":"punctuation.definition.tag.closing.begin.xml.svg"},"2":{"patterns":[{"include":"#tagName"}]},"3":{"name":"punctuation.definition.tag.closing.end.xml.svg"},"4":{"name":"punctuation.definition.tag.self-closing.end.xml.svg"}}},"tag":{"name":"meta.tag.${2:/downcase}.xml.svg","begin":"(?i)(\u003c)([A-Za-z_:][-\\w.:]*)(?=$|\\s|/?\u003e)","end":"(?i)(\u003c/)(\\2)(?:\\s*(\u003e)|(?=\\s*$))|(/\u003e)","patterns":[{"include":"#tagAttr"},{"include":"#main"}],"beginCaptures":{"1":{"name":"punctuation.definition.tag.opening.begin.xml.svg"},"2":{"patterns":[{"include":"#tagName"}]}},"endCaptures":{"1":{"name":"punctuation.definition.tag.closing.begin.xml.svg"},"2":{"patterns":[{"include":"#tagName"}]},"3":{"name":"punctuation.definition.tag.closing.end.xml.svg"},"4":{"name":"punctuation.definition.tag.self-closing.end.xml.svg"}}},"tagAttr":{"begin":"\\G(?!\\s*/\u003e)","end":"\u003e|(?=\\s*/\u003e)","patterns":[{"include":"#attr"}],"endCaptures":{"0":{"name":"punctuation.definition.tag.opening.end.xml.svg"}}},"tagName":{"patterns":[{"match":"(?:^|\\G)([A-Za-z_][-\\w.]*)(:)(?=[-\\w.:])","captures":{"1":{"name":"entity.name.tag.namespace.xml.svg"},"2":{"name":"punctuation.separator.namespace.xml.svg"}}},{"name":"entity.name.tag.localname.xml.svg","match":"[A-Za-z_:][-\\w.:]*"}]},"unescapedBracket":{"name":"punctuation.definition.tag.closing.end.xml.svg","match":"^\\s*(\u003e)"},"unmatchedTag":{"name":"invalid.illegal.unmatched-tag.xml.svg","match":"(\u003c/)([A-Za-z_:][-\\w.:]*)\\s*(\u003e)"}},"injections":{"R:meta.attribute.d.xml.svg string":{"patterns":[{"include":"#commands"}]}}}
|
1
|
+
{"name":"SVG","scopeName":"text.xml.svg","patterns":[{"include":"#main"}],"repository":{"attr":{"name":"meta.attribute.${0:/downcase}.xml.svg","begin":"[A-Za-z_:][-\\w.:]*","end":"(?=\\s*(?:/?\u003e|[^\\s=]))|(?\u003c=[\"'])","patterns":[{"include":"#attrValueCSS"},{"include":"#attrValuePlain"}],"beginCaptures":{"0":{"patterns":[{"include":"#attrName"}]}}},"attrName":{"patterns":[{"match":"(?:^|\\G)([-\\w.]+)(:)(?=[-\\w.:])","captures":{"1":{"name":"entity.other.attribute-name.namespace.xml.svg"},"2":{"name":"punctuation.separator.namespace.xml.svg"}}},{"name":"entity.other.attribute-name.localname.xml.svg","match":"[A-Za-z_:][-\\w.:]*"}]},"attrValueCSS":{"begin":"(?i)(?\u003c=style)\\G\\s*(=)","end":"(?=\\s*(?:[%?/]?\u003e))|(?\u003c=[\"'])([^\\s\u003e]*)|(?:\\G|^)\\s*([^\\s\"'\u003e]+)","patterns":[{"match":"(?:\\G|^)\\s+(?!/?\u003e)"},{"name":"string.quoted.double.xml.svg","begin":"\"","end":"\"","patterns":[{"name":"source.css.style.xml.svg","match":"[^\"]+","captures":{"0":{"patterns":[{"include":"#entity"},{"include":"source.css#rule-list-innards"}]}}}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml.svg"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.xml.svg"}}},{"name":"string.quoted.single.xml.svg","begin":"'","end":"'","patterns":[{"name":"source.css.style.xml.svg","match":"[^']+","captures":{"0":{"patterns":[{"include":"#entity"},{"include":"source.css#rule-list-innards"}]}}}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml.svg"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.xml.svg"}}}],"beginCaptures":{"1":{"name":"punctuation.separator.key-value.xml.svg"}},"endCaptures":{"1":{"name":"invalid.illegal.syntax.xml.svg"},"2":{"name":"string.unquoted.xml.svg","patterns":[{"include":"source.css#rule-list-innards"}]}}},"attrValuePlain":{"begin":"\\s*(=)","end":"(?=\\s*(?:[%?/]?\u003e))|(?\u003c=[\"'])([^\\s\u003e]*)|(?:\\G|^)\\s*([^\\s\"'\u003e]+)","patterns":[{"match":"(?:\\G|^)\\s+(?!/?\u003e)"},{"name":"string.quoted.double.xml.svg","begin":"\"","end":"\"","patterns":[{"include":"#entity"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml.svg"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.xml.svg"}}},{"name":"string.quoted.single.xml.svg","begin":"'","end":"'","patterns":[{"include":"#entity"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml.svg"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.xml.svg"}}}],"beginCaptures":{"1":{"name":"punctuation.separator.key-value.xml.svg"}},"endCaptures":{"1":{"name":"invalid.illegal.syntax.xml.svg"},"2":{"name":"string.unquoted.xml.svg"}}},"cdata":{"name":"string.unquoted.cdata.xml.svg","begin":"\u003c!\\[CDATA\\[","end":"\\]\\]\u003e","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml.svg"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.xml.svg"}}},"commands":{"patterns":[{"name":"keyword.operator.drawing-command.xml.svg","match":"(?i)[MLHVCSQTAZ]"},{"name":"constant.numeric.number.xml.svg","match":"-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][-+]?\\d+)?"},{"name":"punctuation.separator.coordinates.comma.xml.svg","match":","}]},"comment":{"name":"comment.block.xml.svg","begin":"\u003c!--","end":"--\u003e","patterns":[{"name":"invalid.illegal.bad-comment.xml.svg","match":"--(?!\u003e)"}],"beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.xml.svg"}},"endCaptures":{"0":{"name":"punctuation.definition.comment.end.xml.svg"}}},"doctype":{"name":"meta.tag.sgml.doctype.xml.svg","begin":"(\u003c!)(DOCTYPE)\\s+([:a-zA-Z_][-:\\w.]*)","end":"\\s*(\u003e)","patterns":[{"include":"text.xml#internalSubset"}],"beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.xml.svg"},"2":{"name":"keyword.other.doctype.xml.svg"},"3":{"name":"variable.language.documentroot.xml.svg"}},"endCaptures":{"1":{"name":"punctuation.definition.tag.end.xml.svg"}}},"entity":{"patterns":[{"include":"text.xml#entity"},{"include":"text.xml#bare-ampersand"}]},"main":{"patterns":[{"include":"#comment"},{"include":"#cdata"},{"include":"#doctype"},{"include":"text.xml#EntityDecl"},{"include":"text.xml#parameterEntity"},{"include":"#entity"},{"include":"#preprocessor"},{"include":"#scriptTag"},{"include":"#styleTag"},{"include":"#tag"},{"include":"#unescapedBracket"},{"include":"#unmatchedTag"}]},"preprocessor":{"name":"meta.tag.preprocessor.xml.svg","begin":"(\u003c\\?)\\s*","end":"\\?\u003e","patterns":[{"begin":"\\G","end":"([-\\w]+)|(?=\\s*\\?\u003e)","endCaptures":{"1":{"name":"entity.name.tag.xml.svg"}}},{"include":"#attr"}],"beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.xml.svg"}},"endCaptures":{"0":{"name":"punctuation.definition.tag.end.xml.svg"}}},"scriptTag":{"patterns":[{"include":"#scriptTagPlain"},{"include":"#scriptTagJS"}]},"scriptTagJS":{"name":"meta.tag.script.xml.svg","begin":"(?i)(\u003c)(script)(?=$|\\s|/?\u003e)","end":"(?i)(\u003c/)(script)\\s*(\u003e)|(/\u003e)","patterns":[{"include":"#tagAttr"},{"contentName":"source.js.embedded.xml.svg","begin":"(?\u003c=\u003e)","end":"(?i)(?=\\s*\u003c/script\\s*\u003e)","patterns":[{"include":"source.js"},{"include":"#entity"}]}],"beginCaptures":{"1":{"name":"punctuation.definition.tag.opening.begin.xml.svg"},"2":{"patterns":[{"include":"#tagName"}]}},"endCaptures":{"1":{"name":"punctuation.definition.tag.closing.begin.xml.svg"},"2":{"patterns":[{"include":"#tagName"}]},"3":{"name":"punctuation.definition.tag.closing.end.xml.svg"},"4":{"name":"punctuation.definition.tag.self-closing.end.xml.svg"}}},"scriptTagPlain":{"name":"meta.tag.script.xml.svg","begin":"(?x)\n(\u003c)((?i)script)\n(\n\t\\s+[^\u003e]*?\n\t(?\u003c=\\s)(?i:type)\\s*=\\s*\n\t([\"'])?\n\t(?! module\n\t| application/(?:x-)?(?:ecma|java)script\n\t| text/\n\t\t(?: javascript(?:1.[0-5])?\n\t\t| (?:j|ecma|live)script\n\t\t| x-(?:ecma|java)script\n\t\t)\n\t)\n\t(?: (?\u003c=\")(?:[^\"\u003e]+)\"\n\t| (?\u003c=')(?:[^'\u003e]+)'\n\t| [^\\s\"'\u003e]+\n\t)\n\t(?=\\s|/?\u003e)\n)","end":"(?i)(\u003c/)(script)\\s*(\u003e)|(/\u003e)","patterns":[{"include":"#tagAttr"},{"include":"#main"}],"beginCaptures":{"1":{"name":"punctuation.definition.tag.opening.begin.xml.svg"},"2":{"patterns":[{"include":"#tagName"}]},"3":{"patterns":[{"include":"#attr"}]}},"endCaptures":{"1":{"name":"punctuation.definition.tag.closing.begin.xml.svg"},"2":{"patterns":[{"include":"#tagName"}]},"3":{"name":"punctuation.definition.tag.closing.end.xml.svg"},"4":{"name":"punctuation.definition.tag.self-closing.end.xml.svg"}}},"styleTag":{"name":"meta.tag.style.xml.svg","begin":"(?i)(\u003c)(style)(?=$|\\s|/?\u003e)","end":"(?i)(\u003c/)(style)\\s*(\u003e)|(/\u003e)","patterns":[{"include":"#tagAttr"},{"contentName":"source.css.embedded.xml.svg","begin":"(?\u003c=\u003e)","end":"(?i)(?=\\s*\u003c/style\\s*\u003e)","patterns":[{"include":"source.css"},{"include":"#entity"}]}],"beginCaptures":{"1":{"name":"punctuation.definition.tag.opening.begin.xml.svg"},"2":{"patterns":[{"include":"#tagName"}]}},"endCaptures":{"1":{"name":"punctuation.definition.tag.closing.begin.xml.svg"},"2":{"patterns":[{"include":"#tagName"}]},"3":{"name":"punctuation.definition.tag.closing.end.xml.svg"},"4":{"name":"punctuation.definition.tag.self-closing.end.xml.svg"}}},"tag":{"name":"meta.tag.${2:/downcase}.xml.svg","begin":"(?i)(\u003c)([A-Za-z_:][-\\w.:]*)(?=$|\\s|/?\u003e)","end":"(?i)(\u003c/)(\\2)(?:\\s*(\u003e)|(?=\\s*$))|(/\u003e)","patterns":[{"include":"#tagAttr"},{"include":"#main"}],"beginCaptures":{"1":{"name":"punctuation.definition.tag.opening.begin.xml.svg"},"2":{"patterns":[{"include":"#tagName"}]}},"endCaptures":{"1":{"name":"punctuation.definition.tag.closing.begin.xml.svg"},"2":{"patterns":[{"include":"#tagName"}]},"3":{"name":"punctuation.definition.tag.closing.end.xml.svg"},"4":{"name":"punctuation.definition.tag.self-closing.end.xml.svg"}}},"tagAttr":{"begin":"\\G(?!\\s*/\u003e)","end":"\u003e|(?=\\s*/\u003e)","patterns":[{"include":"#attr"}],"endCaptures":{"0":{"name":"punctuation.definition.tag.opening.end.xml.svg"}}},"tagName":{"patterns":[{"match":"(?:^|\\G)([A-Za-z_][-\\w.]*)(:)(?=[-\\w.:])","captures":{"1":{"name":"entity.name.tag.namespace.xml.svg"},"2":{"name":"punctuation.separator.namespace.xml.svg"}}},{"name":"entity.name.tag.localname.xml.svg","match":"[A-Za-z_:][-\\w.:]*"}]},"unescapedBracket":{"name":"punctuation.definition.tag.closing.end.xml.svg","match":"^\\s*(\u003e)"},"unmatchedTag":{"name":"invalid.illegal.unmatched-tag.xml.svg","match":"(\u003c/)([A-Za-z_:][-\\w.:]*)\\s*(\u003e)"}},"injections":{"R:meta.attribute.d.xml.svg string":{"patterns":[{"include":"#commands"}]}}}
|
data/grammars/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
9.
|
1
|
+
9.3.0
|
data/lib/linguist/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
9.
|
1
|
+
9.3.0
|
data/lib/linguist/generated.rb
CHANGED
@@ -67,6 +67,7 @@ module Linguist
|
|
67
67
|
node_modules? ||
|
68
68
|
go_vendor? ||
|
69
69
|
go_lock? ||
|
70
|
+
package_resolved? ||
|
70
71
|
poetry_lock? ||
|
71
72
|
pdm_lock? ||
|
72
73
|
uv_lock? ||
|
@@ -115,6 +116,7 @@ module Linguist
|
|
115
116
|
generated_jooq? ||
|
116
117
|
generated_pascal_tlb? ||
|
117
118
|
generated_sorbet_rbi? ||
|
119
|
+
generated_mysql_view_definition_format? ||
|
118
120
|
generated_sqlx_query?
|
119
121
|
end
|
120
122
|
|
@@ -197,9 +199,11 @@ module Linguist
|
|
197
199
|
def source_map?
|
198
200
|
return false unless extname.downcase == '.map'
|
199
201
|
|
200
|
-
name =~ /(\.css|\.js)\.map$/i ||
|
202
|
+
return true if name =~ /(\.css|\.js)\.map$/i || # Name convention
|
201
203
|
lines[0] =~ /^{"version":\d+,/ || # Revision 2 and later begin with the version number
|
202
204
|
lines[0] =~ /^\/\*\* Begin line maps\. \*\*\/{/ # Revision 1 begins with a magic comment
|
205
|
+
|
206
|
+
false
|
203
207
|
end
|
204
208
|
|
205
209
|
# Internal: Is the blob of JS generated by CoffeeScript?
|
@@ -434,6 +438,13 @@ module Linguist
|
|
434
438
|
!!name.match(/(Gopkg|glide)\.lock/)
|
435
439
|
end
|
436
440
|
|
441
|
+
# Internal: Is the blob a generated Package.resolved?
|
442
|
+
#
|
443
|
+
# Returns true or false.
|
444
|
+
def package_resolved?
|
445
|
+
!!name.match(/Package\.resolved/)
|
446
|
+
end
|
447
|
+
|
437
448
|
# Internal: Is the blob a generated poetry.lock?
|
438
449
|
#
|
439
450
|
# Returns true or false.
|
@@ -711,19 +722,19 @@ module Linguist
|
|
711
722
|
|
712
723
|
# Internal: Is this a generated Dart file?
|
713
724
|
#
|
714
|
-
# A
|
725
|
+
# A google/protoc-plugin generated file contains:
|
715
726
|
# // Generated code. Do not modify.
|
716
|
-
# on the
|
727
|
+
# on the second line.
|
717
728
|
#
|
718
|
-
#
|
729
|
+
# A source_gen generated file may contain:
|
719
730
|
# // GENERATED CODE - DO NOT MODIFY
|
720
|
-
# on the first line.
|
731
|
+
# on the first, second, or third line.
|
721
732
|
#
|
722
733
|
# Return true or false
|
723
734
|
def generated_dart?
|
724
735
|
return false unless extname == '.dart'
|
725
736
|
return false unless lines.count > 1
|
726
|
-
return lines.first.
|
737
|
+
return lines.first(3).any? { |l| l.downcase.match(/generated code\W{2,3}do not modify/) }
|
727
738
|
end
|
728
739
|
|
729
740
|
# Internal: Is the file a generated Perl/Pollution/Portability header file?
|
@@ -867,6 +878,17 @@ module Linguist
|
|
867
878
|
lines[4].match?(/^# Please (run|instead update this file by running) `bin\/tapioca/)
|
868
879
|
end
|
869
880
|
|
881
|
+
# Internal: Is it MySQL View Definition Format?
|
882
|
+
#
|
883
|
+
# MySQL View Definition Format (INI) files are generated by MySQL 5.7 and earlier.
|
884
|
+
# They are not meant to be altered by humans.
|
885
|
+
#
|
886
|
+
# Returns true or false
|
887
|
+
def generated_mysql_view_definition_format?
|
888
|
+
return false unless extname.downcase == '.frm'
|
889
|
+
return lines[0].include?("TYPE=VIEW")
|
890
|
+
end
|
891
|
+
|
870
892
|
# Internal: Is this an HTML coverage report?
|
871
893
|
#
|
872
894
|
# Tools like coverage.py generate HTML reports under an `htmlcov` directory.
|
data/lib/linguist/generic.yml
CHANGED
data/lib/linguist/heuristics.yml
CHANGED
@@ -53,6 +53,13 @@ disambiguations:
|
|
53
53
|
- named_pattern: man-title
|
54
54
|
- named_pattern: man-heading
|
55
55
|
- language: Roff
|
56
|
+
- extensions: ['.action']
|
57
|
+
rules:
|
58
|
+
- language: ROS Interface
|
59
|
+
and:
|
60
|
+
- pattern: '^[a-z][a-z0-9_]*(?:\/[a-zA-Z]\w*)?(?:<=\d+)?(?:\[(?:<=\d+)?\])?\s+\w+\b'
|
61
|
+
- pattern: '^---\s*$'
|
62
|
+
- negative_pattern: '^\s*[^\s@#\w-]'
|
56
63
|
- extensions: ['.al']
|
57
64
|
rules:
|
58
65
|
# AL pattern source from https://github.com/microsoft/AL/blob/master/grammar/alsyntax.tmlanguage - keyword.other.applicationobject.al
|
@@ -144,6 +151,11 @@ disambiguations:
|
|
144
151
|
- (?i:^\s*(end\sfunction)$)
|
145
152
|
- language: Bluespec BH
|
146
153
|
pattern: '^package\s+[A-Za-z_][A-Za-z0-9_'']*(?:\s*\(|\s+where)'
|
154
|
+
- extensions: ['.bst']
|
155
|
+
rules:
|
156
|
+
- language: BibTeX Style
|
157
|
+
pattern: 'ENTRY\s*\{'
|
158
|
+
- language: BuildStream
|
147
159
|
- extensions: ['.builds']
|
148
160
|
rules:
|
149
161
|
- language: XML
|
@@ -284,6 +296,8 @@ disambiguations:
|
|
284
296
|
and:
|
285
297
|
- named_pattern: vb-form
|
286
298
|
- pattern: '^\s*Begin\s+VB\.Form\s+'
|
299
|
+
- language: INI
|
300
|
+
pattern: '\ATYPE=VIEW'
|
287
301
|
- extensions: ['.fs']
|
288
302
|
rules:
|
289
303
|
- language: Forth
|
@@ -523,6 +537,10 @@ disambiguations:
|
|
523
537
|
rules:
|
524
538
|
- language: OMNeT++ MSG
|
525
539
|
pattern: '^cplusplus\(?[\S]*\)?[\s]*\{?\{?|^namespace[\s]+([^.\s]*\.)*[^.\s]*;|^struct[\s]+[\S]+|^message[\s]+[\S]+(extends )?[\S]*[\s]*|^packet[\s]+[\S]+|^class[\s]+[\S]+(extends )?[\S]*[\s]*|^enum[\s]+[\S]+|^import ([^.\s]*\.)*[^.\s]*;'
|
540
|
+
- language: ROS Interface
|
541
|
+
and:
|
542
|
+
- pattern: '^[a-z][a-z0-9_]*(?:\/[a-zA-Z]\w*)?(?:<=\d+)?(?:\[(?:<=\d+)?\])?\s+\w+\b'
|
543
|
+
- negative_pattern: '^\s*[^\s@#\w-]'
|
526
544
|
- extensions: ['.n']
|
527
545
|
rules:
|
528
546
|
- language: Roff
|
@@ -535,8 +553,19 @@ disambiguations:
|
|
535
553
|
pattern: '^\s*<\?xml\s+version'
|
536
554
|
- language: Gerber Image
|
537
555
|
pattern: '^[DGMT][0-9]{2}\*(?:\r?\n|\r)'
|
556
|
+
- language: Nickel
|
557
|
+
pattern:
|
558
|
+
- '^let(?:\srec)?(?:\s[a-zA-Z_][a-zA-Z0-9_]*)?'
|
559
|
+
- '^import\s"[^"]+"\s+as\s'
|
560
|
+
- 'std\.[a-zA-Z_][a-zA-Z0-9_]*\.'
|
538
561
|
- language: Text
|
539
562
|
pattern: 'THE_TITLE'
|
563
|
+
- language: NCL
|
564
|
+
pattern:
|
565
|
+
- '^load "'
|
566
|
+
- '^begin$'
|
567
|
+
- '[0-9]\.$'
|
568
|
+
- '^;'
|
540
569
|
- extensions: ['.nl']
|
541
570
|
rules:
|
542
571
|
- language: NL
|
@@ -730,21 +759,23 @@ disambiguations:
|
|
730
759
|
pattern: '^#+\s+(NAME|SYNOPSIS|DESCRIPTION)'
|
731
760
|
- extensions: ['.scm']
|
732
761
|
rules:
|
733
|
-
- language: Scheme
|
734
|
-
pattern:
|
735
|
-
- '(?:''[\(\*#]|\w->\w|\.\.\.[\s\)]|\([+\-:<>\/=~\)]|~>|[#`]\(|#:\w)'
|
736
|
-
- '^\s*\((?:define\*?|import|library|lambda)'
|
737
|
-
negative_pattern:
|
738
|
-
- '\(#[\w-]+[!\?]'
|
739
|
-
- '[\)\]"_]\s*(?:[\*\+\?]|@\w)'
|
740
762
|
- language: Tree-sitter Query
|
741
763
|
pattern:
|
742
764
|
- '\(#[\w-]+[!\?]'
|
743
|
-
- '[\)\]
|
765
|
+
- '(?:[\)\]]\s*[\*\+\?](?:\s|$))'
|
744
766
|
- '(?:^\s*\w+:\s*[\(\[\"])'
|
745
767
|
- '\(#(?:set!|(?:not-)?(?:any-of|match)\?)'
|
768
|
+
- '@[\w.-]+(?:\)\s|$)'
|
746
769
|
negative_pattern:
|
747
770
|
- '\([+\-:<>\/=~\)]'
|
771
|
+
- language: Scheme
|
772
|
+
pattern:
|
773
|
+
- '(?:''[\(\*#]|\w->\w|\.\.\.[\s\)]|\([+\-:<>\/=~\)]|~>|[#`]\(|#:\w)'
|
774
|
+
- '^\s*\((?:define\*?|import|library|lambda)'
|
775
|
+
negative_pattern:
|
776
|
+
- '\(#[\w-]+[!\?]'
|
777
|
+
- '(?:[\)\]]\s*[\*\+\?](?:\s|$))'
|
778
|
+
- '@[\w.-]+(?:\)\s|$)'
|
748
779
|
- extensions: ['.sol']
|
749
780
|
rules:
|
750
781
|
- language: Solidity
|
@@ -770,6 +801,13 @@ disambiguations:
|
|
770
801
|
rules:
|
771
802
|
- language: SubRip Text
|
772
803
|
pattern: '^(\d{2}:\d{2}:\d{2},\d{3})\s*(-->)\s*(\d{2}:\d{2}:\d{2},\d{3})$'
|
804
|
+
- extensions: ['.srv']
|
805
|
+
rules:
|
806
|
+
- language: ROS Interface
|
807
|
+
and:
|
808
|
+
- pattern: '^[a-z][a-z0-9_]*(?:\/[a-zA-Z]\w*)?(?:<=\d+)?(?:\[(?:<=\d+)?\])?\s+\w+\b'
|
809
|
+
- pattern: '^---\s*$'
|
810
|
+
- negative_pattern: '^\s*[^\s@#\w-]'
|
773
811
|
- extensions: ['.st']
|
774
812
|
rules:
|
775
813
|
- language: StringTemplate
|
@@ -914,7 +952,7 @@ disambiguations:
|
|
914
952
|
pattern: '^\[InternetShortcut\](?:\r?\n|\r)([^\s\[][^\r\n]*(?:\r?\n|\r)){0,20}URL='
|
915
953
|
- extensions: ['.v']
|
916
954
|
rules:
|
917
|
-
- language:
|
955
|
+
- language: Rocq Prover
|
918
956
|
pattern: '(?:^|\s)(?:Proof|Qed)\.(?:$|\s)|(?:^|\s)Require[ \t]+(Import|Export)\s'
|
919
957
|
- language: Verilog
|
920
958
|
pattern: '^[ \t]*module\s+[^\s()]+\s+\#?\(|^[ \t]*`(?:define|ifdef|ifndef|include|timescale)|^[ \t]*always[ \t]+@|^[ \t]*initial[ \t]+(begin|@)'
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Linguist
|
2
|
+
class BasicInstrumenter
|
3
|
+
attr_reader :detected_info
|
4
|
+
|
5
|
+
def initialize
|
6
|
+
@detected_info = {}
|
7
|
+
end
|
8
|
+
|
9
|
+
def instrument(name, payload = {})
|
10
|
+
if name == "linguist.detected" && payload[:blob]
|
11
|
+
@detected_info[payload[:blob].name] = {
|
12
|
+
strategy: payload[:strategy].name.split("::").last,
|
13
|
+
language: payload[:language]&.name
|
14
|
+
}
|
15
|
+
end
|
16
|
+
yield if block_given?
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|