{ "name": "Jade", "scopeName": "text.jade", "patterns": [ { "name": "meta.tag.sgml.doctype.html", "match": "^(!!!|doctype)(\\s*[a-zA-Z0-9-_]+)?" }, { "name": "comment.unbuffered.block.jade", "begin": "^(\\s*)//-", "end": "^(?!(\\1\\s)|\\s*$)" }, { "name": "string.comment.buffered.block.jade", "begin": "^(\\s*)//", "end": "^(?!(\\1\\s)|\\s*$)", "patterns": [ { "name": "string.comment.buffered.block.jade", "match": "^\\s*(//)(?!-)", "captures": { "1": { "name": "invalid.illegal.comment.comment.block.jade" } } } ] }, { "name": "comment.unbuffered.block.jade", "begin": "\u003c!--", "end": "--\\s*\u003e", "patterns": [ { "name": "invalid.illegal.comment.comment.block.jade", "match": "--" } ] }, { "name": "source.js", "begin": "^(\\s*)-$", "end": "^(?!(\\1\\s)|\\s*$)", "patterns": [ { "include": "source.js" } ] }, { "name": "meta.tag.other", "begin": "^(\\s*)(script)((\\.$)|(?=[^\\n]*(text|application)/javascript.*\\.$))", "end": "^(?!(\\1\\s)|\\s*$)", "patterns": [ { "begin": "\\G(?=\\()", "end": "$", "patterns": [ { "include": "#tag_attributes" } ] }, { "begin": "\\G(?=[.#])", "end": "$", "patterns": [ { "include": "#complete_tag" } ] }, { "include": "source.js" } ], "beginCaptures": { "2": { "name": "entity.name.tag.jade" } } }, { "name": "meta.tag.other", "begin": "^(\\s*)(style)((\\.$)|(?=[.#(].*\\.$))", "end": "^(?!(\\1\\s)|\\s*$)", "patterns": [ { "begin": "\\G(?=\\()", "end": "$", "patterns": [ { "include": "#tag_attributes" } ] }, { "begin": "\\G(?=[.#])", "end": "$", "patterns": [ { "include": "#complete_tag" } ] }, { "include": "source.css" } ], "beginCaptures": { "2": { "name": "entity.name.tag.jade" } } }, { "name": "source.sass.filter.jade", "begin": "^(\\s*):(sass)(?=\\(|$)", "end": "^(?!(\\1\\s)|\\s*$)", "patterns": [ { "include": "#tag_attributes" }, { "include": "source.sass" } ], "beginCaptures": { "2": { "name": "constant.language.name.sass.filter.jade" } } }, { "name": "source.less.filter.jade", "begin": "^(\\s*):(less)(?=\\(|$)", "end": "^(?!(\\1\\s)|\\s*$)", "patterns": [ { "include": "#tag_attributes" }, { "include": "source.css.less" } ], "beginCaptures": { "2": { "name": "constant.language.name.less.filter.jade" } } }, { "begin": "^(\\s*):(stylus)(?=\\(|$)", "end": "^(?!(\\1\\s)|\\s*$)", "patterns": [ { "include": "#tag_attributes" }, { "include": "source.stylus" } ], "beginCaptures": { "2": { "name": "constant.language.name.stylus.filter.jade" } } }, { "name": "source.coffeescript.filter.jade", "begin": "^(\\s*):(coffee(-?script)?)(?=\\(|$)", "end": "^(?!(\\1\\s)|\\s*$)", "patterns": [ { "include": "#tag_attributes" }, { "include": "source.coffee" } ], "beginCaptures": { "2": { "name": "constant.language.name.coffeescript.filter.jade" } } }, { "begin": "^(\\s*)((:(?=.))|(:$))", "end": "^(?!(\\1\\s)|\\s*$)", "patterns": [ { "name": "name.generic.filter.jade", "begin": "\\G(?\u003c=:)(?=.)", "end": "$", "patterns": [ { "name": "invalid.illegal.name.generic.filter.jade", "match": "\\G\\(" }, { "name": "constant.language.name.generic.filter.jade", "match": "[\\w-]" }, { "include": "#tag_attributes" }, { "name": "invalid.illegal.name.generic.filter.jade", "match": "\\W" } ] } ], "beginCaptures": { "4": { "name": "invalid.illegal.empty.generic.filter.jade" } } }, { "begin": "^(\\s*)(?=[\\w.#].*?\\.$)(?=(?:(?:(?:(?:(?:#[\\w-]+)|(?:\\.[\\w-]+))|(?:(?:[#!]\\{[^}]*\\})|(?:\\w(?:(?:[\\w:-]+[\\w-])|(?:[\\w-]*)))))(?:(?:#[\\w-]+)|(?:\\.[\\w-]+)|(?:\\((?:[^()\\'\\\"]*(?:(?:\\'(?:[^\\']|(?:(?\u003c!\\\\)\\\\\\'))*\\')|(?:\\\"(?:[^\\\"]|(?:(?\u003c!\\\\)\\\\\\\"))*\\\")))*[^()]*\\))*)*)(?:(?:(?::\\s+)|(?\u003c=\\)))(?:(?:(?:(?:#[\\w-]+)|(?:\\.[\\w-]+))|(?:(?:[#!]\\{[^}]*\\})|(?:\\w(?:(?:[\\w:-]+[\\w-])|(?:[\\w-]*)))))(?:(?:#[\\w-]+)|(?:\\.[\\w-]+)|(?:\\((?:[^()\\'\\\"]*(?:(?:\\'(?:[^\\']|(?:(?\u003c!\\\\)\\\\\\'))*\\')|(?:\\\"(?:[^\\\"]|(?:(?\u003c!\\\\)\\\\\\\"))*\\\")))*[^()]*\\))*)*))*)\\.$)(?:(?:(#[\\w-]+)|(\\.[\\w-]+))|((?:[#!]\\{[^}]*\\})|(?:\\w(?:(?:[\\w:-]+[\\w-])|(?:[\\w-]*)))))", "end": "^(?!(\\1\\s)|\\s*$)", "patterns": [ { "include": "#tag_attributes" }, { "include": "#complete_tag" }, { "name": "text.block.jade", "begin": "^(?=.)", "end": "$", "patterns": [ { "include": "#inline_jade" }, { "include": "#embedded_html" }, { "include": "#html_entity" }, { "include": "#interpolated_value" }, { "include": "#interpolated_error" } ] } ], "beginCaptures": { "2": { "name": "entity.other.attribute-name.id.jade" }, "3": { "name": "entity.other.attribute-name.class.jade" }, "4": { "name": "meta.tag.other entity.name.tag.jade" } } }, { "begin": "^\\s*", "end": "$", "patterns": [ { "include": "#inline_jade" }, { "include": "#blocks_and_includes" }, { "include": "#unbuffered_code" }, { "include": "#mixin_definition" }, { "include": "#mixin_call" }, { "include": "#flow_control" }, { "include": "#case_conds" }, { "name": "text.block.pipe.jade", "begin": "\\|", "end": "$", "patterns": [ { "include": "#inline_jade" }, { "include": "#embedded_html" }, { "include": "#html_entity" }, { "include": "#interpolated_value" }, { "include": "#interpolated_error" } ] }, { "include": "#printed_expression" }, { "begin": "\\G(?=(#[^\\{\\w-])|[^\\w.#])", "end": "$", "patterns": [ { "begin": "\u003c/?(?=[!#])", "end": "\u003e|$", "patterns": [ { "include": "#inline_jade" }, { "include": "#interpolated_value" }, { "include": "#interpolated_error" } ] }, { "include": "#inline_jade" }, { "include": "#embedded_html" }, { "include": "#html_entity" }, { "include": "#interpolated_value" }, { "include": "#interpolated_error" } ] }, { "include": "#complete_tag" } ] } ], "repository": { "babel_parens": { "begin": "\\(", "end": "\\)|(({\\s*)?$)", "patterns": [ { "include": "#babel_parens" }, { "include": "source.js" } ] }, "blocks_and_includes": { "name": "meta.first-class.jade", "match": "(extends|include|yield|append|prepend|block( (append|prepend))?)\\s+(.*)$", "captures": { "1": { "name": "storage.type.import.include.jade" }, "4": { "name": "variable.control.import.include.jade" } } }, "case_conds": { "name": "meta.control.flow.jade", "begin": "(default|when)((\\s+|(?=:))|$)", "end": "$", "patterns": [ { "name": "js.embedded.control.flow.jade", "begin": "\\G(?!:)", "end": "(?=:\\s+)|$", "patterns": [ { "include": "#case_when_paren" }, { "include": "source.js" } ] }, { "name": "tag.case.control.flow.jade", "begin": ":\\s+", "end": "$", "patterns": [ { "include": "#complete_tag" } ] } ], "captures": { "1": { "name": "storage.type.function.jade" } } }, "case_when_paren": { "name": "js.when.control.flow.jade", "begin": "\\(", "end": "\\)", "patterns": [ { "include": "#case_when_paren" }, { "name": "invalid.illegal.name.tag.jade", "match": ":" }, { "include": "source.js" } ] }, "complete_tag": { "begin": "(?=[\\w.#])|(:\\s*)", "end": "(\\.?$)|(?=:.)", "patterns": [ { "include": "#blocks_and_includes" }, { "include": "#unbuffered_code" }, { "include": "#mixin_call" }, { "include": "#flow_control" }, { "name": "invalid.illegal.name.tag.jade", "match": "(?\u003c=:)\\w.*$" }, { "include": "#tag_name" }, { "include": "#tag_id" }, { "include": "#tag_classes" }, { "include": "#tag_attributes" }, { "include": "#tag_mixin_attributes" }, { "match": "((\\.)\\s+$)|((:)\\s*$)", "captures": { "2": { "name": "invalid.illegal.end.tag.jade" }, "4": { "name": "invalid.illegal.end.tag.jade" } } }, { "include": "#printed_expression" }, { "include": "#tag_text" } ] }, "embedded_html": { "name": "html", "begin": "(?=\u003c[^\u003e]*\u003e)", "end": "$|(?=\u003e)", "patterns": [ { "include": "text.html.basic" }, { "include": "#interpolated_value" }, { "include": "#interpolated_error" } ] }, "flow_control": { "name": "meta.control.flow.jade", "begin": "(for|if|else if|else|each|until|while|unless|case)(\\s+|$)", "end": "$", "patterns": [ { "name": "js.embedded.control.flow.jade", "end": "$", "patterns": [ { "include": "source.js" } ] } ], "captures": { "1": { "name": "storage.type.function.jade" } } }, "html_entity": { "patterns": [ { "name": "constant.character.entity.html.text.jade", "match": "(\u0026)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)" }, { "name": "invalid.illegal.html_entity.text.jade", "match": "[\u003c\u003e\u0026]" } ] }, "inline_jade": { "name": "inline.jade", "begin": "(?\u003c!\\\\)(#\\[)", "end": "(\\])", "patterns": [ { "include": "#inline_jade" }, { "include": "#mixin_call" }, { "name": "tag.inline.jade", "begin": "(?\u003c!\\])(?=[\\w.#])|(:\\s*)", "end": "(?=\\]|(:.)|=|\\s)", "patterns": [ { "include": "#tag_name" }, { "include": "#tag_id" }, { "include": "#tag_classes" }, { "include": "#tag_attributes" }, { "include": "#tag_mixin_attributes" }, { "include": "#inline_jade" }, { "name": "invalid.illegal.tag.jade", "match": "\\[" } ] }, { "include": "#unbuffered_code" }, { "include": "#printed_expression" }, { "name": "invalid.illegal.tag.jade", "match": "\\[" }, { "include": "#inline_jade_text" } ], "captures": { "1": { "name": "entity.name.function.jade" }, "2": { "name": "entity.name.function.jade" } } }, "inline_jade_text": { "end": "(?=\\])", "patterns": [ { "begin": "\\[", "end": "\\]", "patterns": [ { "include": "#inline_jade_text" } ] }, { "include": "#inline_jade" }, { "include": "#embedded_html" }, { "include": "#html_entity" }, { "include": "#interpolated_value" }, { "include": "#interpolated_error" } ] }, "interpolated_error": { "name": "invalid.illegal.tag.jade", "match": "(?\u003c!\\\\)[#!]\\{(?=[^}]*$)" }, "interpolated_value": { "name": "string.interpolated.jade", "begin": "(?\u003c!\\\\)[#!]\\{(?=.*?\\})", "end": "\\}", "patterns": [ { "name": "invalid.illegal.tag.jade", "match": "{" }, { "include": "source.js" } ] }, "js_braces": { "begin": "\\{", "end": "\\}", "patterns": [ { "include": "#js_braces" }, { "include": "source.js" } ] }, "js_brackets": { "begin": "\\[", "end": "\\]", "patterns": [ { "include": "#js_brackets" }, { "include": "source.js" } ] }, "js_parens": { "begin": "\\(", "end": "\\)", "patterns": [ { "include": "#js_parens" }, { "include": "source.js" } ] }, "mixin_call": { "begin": "((?:mixin\\s+)|\\+)([\\w-]+)", "end": "(?!\\()|$", "patterns": [ { "name": "args.mixin.jade", "begin": "(?\u003c!\\))\\(", "end": "\\)", "patterns": [ { "include": "#js_parens" }, { "include": "#string" }, { "match": "([^\\s(),=/]+)\\s*=\\s*", "captures": { "1": { "name": "meta.tag.other entity.other.attribute-name.tag.jade" } } }, { "include": "source.js" } ] }, { "include": "#tag_attributes" } ], "beginCaptures": { "1": { "name": "storage.type.function.jade" }, "2": { "name": "meta.tag.other entity.name.function.jade" } } }, "mixin_definition": { "match": "(mixin\\s+)([\\w-]+)(?:(\\()\\s*((?:[a-zA-Z_]\\w*\\s*)(?:,\\s*[a-zA-Z_]\\w*\\s*)*)(\\)))?$", "captures": { "1": { "name": "storage.type.function.jade" }, "2": { "name": "meta.tag.other entity.name.function.jade" }, "3": { "name": "punctuation.definition.parameters.begin.js" }, "4": { "name": "variable.parameter.function.js" }, "5": { "name": "punctuation.definition.parameters.begin.js" } } }, "printed_expression": { "name": "source.js", "begin": "(!?\\=)\\s*", "end": "(?=\\])|$", "patterns": [ { "include": "#js_brackets" }, { "include": "source.js" } ], "captures": { "1": { "name": "constant" } } }, "string": { "name": "string.quoted.jade", "begin": "(['\"])", "end": "(?\u003c!\\\\)\\1", "patterns": [ { "name": "constant.character.quoted.jade", "match": "\\\\((x[0-9a-fA-F]{2})|(u[0-9]{4})|.)" }, { "include": "#interpolated_value" }, { "include": "#interpolated_error" } ] }, "tag_attribute_name": { "match": "([^\\s(),=/!]+)\\s*", "captures": { "1": { "name": "entity.other.attribute-name.tag.jade" } } }, "tag_attribute_name_paren": { "name": "entity.other.attribute-name.tag.jade", "begin": "\\(\\s*", "end": "\\)", "patterns": [ { "include": "#tag_attribute_name_paren" }, { "include": "#tag_attribute_name" } ] }, "tag_attributes": { "name": "meta.tag.other", "begin": "(\\(\\s*)", "end": "(\\))", "patterns": [ { "include": "#tag_attribute_name_paren" }, { "include": "#tag_attribute_name" }, { "name": "invalid.illegal.tag.jade", "match": "!(?!=)" }, { "name": "attribute_value", "begin": "=\\s*", "end": "$|(?=,|(?:\\s+[^!%\u0026*-+~|\u003c\u003e:?/])|\\))", "patterns": [ { "include": "#string" }, { "include": "#js_parens" }, { "include": "#js_brackets" }, { "include": "#js_braces" }, { "include": "source.js" } ] }, { "name": "attribute_value2", "begin": "(?\u003c=[%\u0026*-+~|\u003c\u003e:?/])\\s+", "end": "$|(?=,|(?:\\s+[^!%\u0026*-+~|\u003c\u003e:?/])|\\))", "patterns": [ { "include": "#string" }, { "include": "#js_parens" }, { "include": "#js_brackets" }, { "include": "#js_braces" }, { "include": "source.js" } ] } ], "captures": { "1": { "name": "constant.name.attribute.tag.jade" } } }, "tag_classes": { "name": "entity.other.attribute-name.class.jade", "match": "\\.([^\\w-])?[\\w-]*", "captures": { "1": { "name": "invalid.illegal.tag.jade" } } }, "tag_id": { "name": "entity.other.attribute-name.id.jade", "match": "#[\\w-]+" }, "tag_mixin_attributes": { "name": "meta.tag.other", "begin": "(\u0026attributes\\()", "end": "(\\))", "patterns": [ { "name": "storage.type.keyword.jade", "match": "attributes(?=\\))" }, { "include": "source.js" } ], "captures": { "1": { "name": "entity.name.function.jade" } } }, "tag_name": { "name": "meta.tag.other entity.name.tag.jade", "begin": "([#!]\\{(?=.*?\\}))|(\\w(([\\w:-]+[\\w-])|([\\w-]*)))", "end": "(\\G(?\u003c!\\5[^\\w-]))|\\}|$", "patterns": [ { "name": "meta.tag.other entity.name.tag.jade", "begin": "\\G(?\u003c=\\{)", "end": "(?=\\})", "patterns": [ { "name": "invalid.illegal.tag.jade", "match": "{" }, { "include": "source.js" } ] } ] }, "tag_text": { "begin": "(?=.)", "end": "$", "patterns": [ { "include": "#inline_jade" }, { "include": "#embedded_html" }, { "include": "#html_entity" }, { "include": "#interpolated_value" }, { "include": "#interpolated_error" } ] }, "unbuffered_code": { "name": "source.js", "begin": "(-|(([a-zA-Z0-9_]+)\\s+=))", "end": "(?=\\])|(({\\s*)?$)", "patterns": [ { "include": "#js_brackets" }, { "include": "#babel_parens" }, { "include": "source.js" } ], "beginCaptures": { "3": { "name": "variable.parameter.javascript.embedded.jade" } } } } }