{ "name": "HTML (Ruby - ERB)", "scopeName": "text.html.erb", "patterns": [ { "include": "text.html.basic" } ], "repository": { "comment": { "patterns": [ { "name": "comment.block.erb", "begin": "\u003c%+#", "end": "%\u003e", "beginCaptures": { "0": { "name": "punctuation.definition.comment.begin.erb" } }, "endCaptures": { "0": { "name": "punctuation.definition.comment.end.erb" } } } ] }, "tags": { "patterns": [ { "name": "meta.embedded.block.erb", "contentName": "source.ruby.embedded.erb", "begin": "\u003c%+(?!\u003e)[-=]?(?![^%]*%\u003e)", "end": "-?%\u003e", "patterns": [ { "name": "comment.line.number-sign.erb", "match": "(#).*?(?=-?%\u003e)", "captures": { "1": { "name": "punctuation.definition.comment.erb" } } }, { "include": "source.ruby" } ], "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.erb" } }, "endCaptures": { "0": { "name": "punctuation.section.embedded.end.erb" }, "1": { "name": "source.ruby" } } }, { "name": "meta.embedded.line.erb", "contentName": "source.ruby.embedded.erb", "begin": "\u003c%+(?!\u003e)[-=]?", "end": "-?%\u003e", "patterns": [ { "name": "comment.line.number-sign.erb", "match": "(#).*?(?=-?%\u003e)", "captures": { "1": { "name": "punctuation.definition.comment.erb" } } }, { "include": "source.ruby" } ], "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.erb" } }, "endCaptures": { "0": { "name": "punctuation.section.embedded.end.erb" }, "1": { "name": "source.ruby" } } } ] } }, "injections": { "text.html.erb - (meta.embedded.block.erb | meta.embedded.line.erb | meta.tag | comment), meta.tag string.quoted": { "patterns": [ { "begin": "(^\\s*)(?=\u003c%+#(?![^%]*%\u003e))", "end": "(?!\\G)(\\s*$\\n)?", "patterns": [ { "include": "#comment" } ], "beginCaptures": { "0": { "name": "punctuation.whitespace.comment.leading.erb" } }, "endCaptures": { "0": { "name": "punctuation.whitespace.comment.trailing.erb" } } }, { "begin": "(^\\s*)(?=\u003c%(?![^%]*%\u003e))", "end": "(?!\\G)(\\s*$\\n)?", "patterns": [ { "include": "#tags" } ], "beginCaptures": { "0": { "name": "punctuation.whitespace.embedded.leading.erb" } }, "endCaptures": { "0": { "name": "punctuation.whitespace.embedded.trailing.erb" } } }, { "include": "#comment" }, { "include": "#tags" } ] } } }