--- name: Movable Type fileTypes: - mtml firstLineMatch: <\$?MT scopeName: text.html.mt repository: tag-stuff: patterns: - 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" mt-container-tag: patterns: - name: meta.tag.mt.container.html endCaptures: "0": name: punctuation.definition.tag.mt begin: (" patterns: - include: "#tag-stuff" 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 captures: "0": name: punctuation.section.embedded.php begin: <\?(php|=)? end: \?> patterns: - include: "#php-source" mt-variable-tag: patterns: - name: meta.tag.mt.variable.html endCaptures: "1": name: variable.other.mt "2": name: punctuation.definition.tag.mt begin: (<)(\$MT\w+) beginCaptures: "1": name: punctuation.definition.tag.mt "2": name: variable.other.mt end: (\$)?(>) patterns: - include: "#tag-stuff" php-source: patterns: - name: comment.line.number-sign.ruby captures: "1": name: punctuation.definition.comment.php match: (#).*?(?=\?>) - name: comment.line.double-slash.ruby captures: "1": name: punctuation.definition.comment.php match: (//).*?(?=\?>) - include: source.php entities: patterns: - name: constant.character.entity.html captures: "1": name: punctuation.definition.constant.html "3": name: punctuation.definition.constant.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" tag-generic-attribute: name: entity.other.attribute-name.html match: \b([a-zA-Z-_:]+) ruby: name: source.ruby.embedded.html captures: "0": name: punctuation.section.embedded.ruby begin: <%+(?!>)=? end: -?%> patterns: - name: comment.line.number-sign.ruby captures: "1": name: punctuation.definition.comment.ruby match: (#).*?(?=-?%>) - include: source.ruby smarty: name: source.smarty.embedded.xhtml captures: "0": name: punctuation.section.embedded.smarty begin: "{{|{" end: "}}|}" disabled: "1" patterns: - include: source.smarty embedded-code: patterns: - include: "#php" - include: "#ruby" - include: "#smarty" uuid: 7071B5CA-849A-4D88-A96E-DD725ED622BF foldingStartMarker: (<(?i:(head|table|tr|div|style|script|ul|ol|form|dl))\b.*?>||\{\{(if|foreach|capture|literal|foreach|php|section|strip)|\{\s*$) patterns: - include: "#mt-container-tag" - include: "#mt-variable-tag" - include: text.html.basic comment: This is set to use XHTML standards, but you can change that by changing .strict to .basic for HTML standards - name: source.smarty.embedded.html captures: "0": name: punctuation.section.embedded.smarty begin: "{{" end: "}}" patterns: - include: source.smarty foldingStopMarker: (|<\/MT\w+\b.*?>|\{\{/(if|foreach|capture|literal|foreach|php|section|strip)|(^|\s)\}\}) keyEquivalent: ^~M