--- name: HTML (ASP.net) fileTypes: - aspx - ascx scopeName: text.html.asp.net repository: source-asp-embedded: name: meta.source.embedded endCaptures: "0": name: punctuation.section.embedded.end.asp begin: <%(?![=#]) beginCaptures: "0": name: punctuation.section.embedded.begin.asp end: "%>" patterns: - name: source.asp.embedded.html begin: (?<=<%) end: (?=%>) patterns: - include: source.asp.vb.net tag-stuff: patterns: - include: "#tag-id-attribute" - include: "#tag-generic-attribute" - include: "#string-double-quoted" - include: "#string-single-quoted" string-double-quoted: name: string.quoted.double.html endCaptures: "0": name: punctuation.definition.string.end.html begin: "\"" beginCaptures: "0": name: punctuation.definition.string.begin.html end: "\"" patterns: - include: "#embedded-code" - include: "#entities" source-asp-single-line: name: meta.source.embedded.single-line endCaptures: "0": name: punctuation.section.embedded.end.asp begin: <%(=|#|@) beginCaptures: "0": name: punctuation.section.embedded.begin.asp end: "%>" patterns: - name: source.asp.embedded.html begin: (?<=<%) end: (?=%>) patterns: - include: source.asp.vb.net comment: DEBUG php: patterns: - name: source.php.embedded.html captures: "1": name: punctuation.section.embedded.php begin: (?:^\s*)(<\?(php|=)?)(?!.*\?>) end: (\?>)(?:\s*$\n)? patterns: - include: "#php-source" comment: match only multi-line PHP with leading whitespace - name: source.php.embedded.html endCaptures: "0": name: punctuation.section.embedded.end.php begin: <\?(php|=)? beginCaptures: "0": name: punctuation.section.embedded.begin.php end: \?> patterns: - include: "#php-source" php-source: patterns: - name: comment.line.number-sign.php captures: "1": name: punctuation.definition.comment.php match: (#).*?(?=\?>) - name: comment.line.double-slash.php captures: "1": name: punctuation.definition.comment.php match: (//).*?(?=\?>) - include: source.php entities: patterns: - name: constant.character.entity.html captures: "1": name: punctuation.definition.entity.html "3": name: punctuation.definition.entity.html match: (&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;) - name: invalid.illegal.bad-ampersand.html match: "&" string-single-quoted: name: string.quoted.single.html endCaptures: "0": name: punctuation.definition.string.end.html begin: "'" beginCaptures: "0": name: punctuation.definition.string.begin.html end: "'" patterns: - include: "#embedded-code" - include: "#entities" source-asp-return: name: meta.source.embedded.return-value endCaptures: "0": name: punctuation.section.embedded.end.asp begin: <%= beginCaptures: "0": name: punctuation.section.embedded.begin.asp end: "%>" patterns: - name: source.asp.embedded.html begin: (?<=<%=) end: (?=%>) patterns: - include: source.asp.vb.net source-asp-embedded-scripttag: name: meta.source.embedded.script-tag captures: "1": name: punctuation.definition.tag.html "2": name: entity.name.tag.script.html "3": name: punctuation.definition.tag.html begin: (?:^\s+)?(<)(script).*runat=.server[^>]*(>) end: ()(?:\s*$\n)? patterns: - name: source.asp.embedded.html begin: (?<=(>)) end: (?=) patterns: - include: source.asp.vb.net tag-id-attribute: name: meta.attribute-with-value.id.html captures: "1": name: entity.other.attribute-name.id.html "2": name: punctuation.separator.key-value.html begin: \b(id)\b\s*(=) end: (?<='|") patterns: - name: string.quoted.double.html endCaptures: "0": name: punctuation.definition.string.end.html begin: "\"" contentName: meta.toc-list.id.html beginCaptures: "0": name: punctuation.definition.string.begin.html end: "\"" patterns: - include: "#embedded-code" - include: "#entities" - name: string.quoted.single.html endCaptures: "0": name: punctuation.definition.string.end.html begin: "'" contentName: meta.toc-list.id.html beginCaptures: "0": name: punctuation.definition.string.begin.html end: "'" patterns: - include: "#embedded-code" - include: "#entities" source-asp-bound: name: meta.source.embedded.bound endCaptures: "0": name: punctuation.section.embedded.end.asp begin: <%# beginCaptures: "0": name: punctuation.section.embedded.begin.asp end: "%>" patterns: - name: source.asp.embedded.html begin: (?<=<%#) end: (?=%>) patterns: - include: source.asp.vb.net tag-generic-attribute: name: entity.other.attribute-name.html match: \b([a-zA-Z-:]+) ruby: name: source.ruby.embedded.html endCaptures: "0": name: punctuation.section.embedded.end.ruby begin: <%+(?!>)=? beginCaptures: "0": name: punctuation.section.embedded.begin.ruby end: -?%> patterns: - name: comment.line.number-sign.ruby captures: "1": name: punctuation.definition.comment.ruby match: (#).*?(?=-?%>) - include: source.ruby asp: patterns: - include: "#source-asp-embedded-scripttag" - include: "#source-asp-embedded" - include: "#source-asp-bound" - include: "#source-asp-return" - name: meta.source.embedded.asp.include captures: "1": name: punctuation.definition.tag.asp "3": name: punctuation.definition.tag.asp match: () smarty: patterns: - captures: "1": name: source.smarty.embedded.html "2": name: punctuation.section.embedded.smarty "3": name: support.function.built-in.smarty "4": name: punctuation.section.embedded.smarty begin: ((\{)(literal)(\})) end: ((\{/)(literal)(\})) - name: source.smarty.embedded.html captures: "0": name: punctuation.section.embedded.smarty begin: "{{|{" end: "}}|}" disabled: 1 patterns: - include: source.smarty embedded-code: patterns: - include: "#php" - include: "#asp" - include: "#smarty" uuid: 426BF395-E61E-430F-8E4C-47F2E15C769B foldingStartMarker: |- (?x) (<(?i:mm:dataset|mm:insert|mm:update|asp:DataGrid|asp:Repeater|asp:TemplateColumn|head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)\b |) |<%(?!.*%>) |\{\{?(if|foreach|capture|literal|foreach|php|section|strip) |\{\s*($|\?>\s*$|//|/\*(.*\*/\s*$|(?!.*?\*/))) ) patterns: - include: "#php" - include: "#asp" - include: "#smarty" - name: meta.tag.html captures: "6": name: punctuation.definition.tag.html "1": name: punctuation.definition.tag.html "2": name: entity.name.tag.html "3": name: punctuation.definition.tag.html "4": name: meta.scope.between-tag-pair.html "5": name: entity.name.tag.html match: (<)(\w+)[^>]*((>)) - name: meta.tag.preprocessor.xml.html captures: "1": name: punctuation.definition.tag.html "2": name: entity.name.tag.xml.html begin: (<\?)(xml) end: (\?>) patterns: - include: "#tag-generic-attribute" - include: "#string-double-quoted" - include: "#string-single-quoted" - name: comment.block.html captures: "0": name: punctuation.definition.comment.asp.net begin: patterns: - name: invalid.illegal.bad-comments-or-CDATA.html match: -- - name: meta.tag.sgml.html captures: "0": name: punctuation.definition.tag.asp.net begin: " patterns: - name: meta.tag.sgml.doctype.html captures: "1": name: entity.name.tag.doctype.html begin: (DOCTYPE) end: (?=>) patterns: - name: string.quoted.double.doctype.identifiers-and-DTDs.html match: "\"[^\">]*\"" - name: constant.other.inline-data.html begin: \[CDATA\[ end: "]](?=>)" - name: invalid.illegal.bad-comments-or-CDATA.html match: (\s*)(?!--|>)\S(\s*) - name: source.js.embedded.html captures: "1": name: punctuation.definition.tag.html "2": name: entity.name.tag.script.html begin: (?:^\s+)?(<)((?i:script))\b(?![^>]*/>) end: (?<=)(?:\s*\n)? patterns: - include: "#tag-stuff" - captures: "1": name: punctuation.definition.tag.html begin: (?) end: (]*/>) end: ()(?:\s*\n)? patterns: - include: "#tag-stuff" - begin: (>) beginCaptures: "1": name: punctuation.definition.tag.html end: (?=) patterns: - include: "#tag-stuff" - name: meta.tag.block.any.html captures: "1": name: punctuation.definition.tag.html "2": name: entity.name.tag.block.any.html begin: () patterns: - include: "#tag-stuff" - name: meta.tag.inline.any.html captures: "1": name: punctuation.definition.tag.html "2": name: entity.name.tag.inline.any.html begin: () patterns: - include: "#tag-stuff" - name: meta.tag.other.html captures: "1": name: punctuation.definition.tag.html "2": name: entity.name.tag.other.html begin: () patterns: - include: "#tag-stuff" - include: "#entities" - name: invalid.illegal.incomplete.html match: <> - name: invalid.illegal.bad-angle-bracket.html match: <(?=\W)|> foldingStopMarker: |- (?x) ( |^\s*--> |^\s*%> |\{\{?/(if|foreach|capture|literal|foreach|php|section|strip) |(^|\s)\} ) keyEquivalent: ^~A comment: This is a modified version of the HTML language that uses ASP VB.NET for embedded source code instead of ruby. Thomas Aylott subtleGradient.com