site/node_modules/shiki/dist/langs/haml.mjs

27 lines
9.1 KiB
JavaScript
Raw Permalink Normal View History

2024-10-14 06:09:33 +00:00
import ruby from './ruby.mjs';
import javascript from './javascript.mjs';
import sass from './sass.mjs';
import coffee from './coffee.mjs';
import markdown from './markdown.mjs';
import css from './css.mjs';
import './html.mjs';
import './xml.mjs';
import './java.mjs';
import './sql.mjs';
import './c.mjs';
import './shellscript.mjs';
import './lua.mjs';
const lang = Object.freeze({ "displayName": "Ruby Haml", "fileTypes": ["haml", "html.haml"], "foldingStartMarker": "^\\s*([-%#\\:\\.\\w\\=].*)\\s$", "foldingStopMarker": "^\\s*$", "name": "haml", "patterns": [{ "begin": "^(\\s*)==", "contentName": "string.quoted.double.ruby", "end": "$\\n*", "patterns": [{ "include": "#interpolated_ruby" }] }, { "begin": "^(\\s*):ruby", "end": "^(?!\\1\\s+|$\\n*)", "name": "source.ruby.embedded.filter.haml", "patterns": [{ "include": "source.ruby" }] }, { "captures": { "1": { "name": "punctuation.definition.prolog.haml" } }, "match": "^(!!!)($|\\s.*)", "name": "meta.prolog.haml" }, { "begin": "^(\\s*):javascript", "end": "^(?!\\1\\s+|$\\n*)", "name": "js.haml", "patterns": [{ "include": "source.js" }] }, { "begin": "^(\\s*)%script", "end": "^(?!\\1\\s+|$\\n*)", "name": "js.inline.haml", "patterns": [{ "include": "source.js" }] }, { "begin": "^(\\s*):ruby$", "end": "^(?!\\1\\s+|$\\n*)", "name": "source.ruby.embedded.filter.haml", "patterns": [{ "include": "source.ruby" }] }, { "captures": { "1": { "name": "punctuation.section.comment.haml" } }, "match": "^(\\s*)(\\/\\[[^\\]].*?$\\n?)", "name": "comment.line.slash.haml" }, { "begin": "^(\\s*)(\\-\\#|\\/|\\-\\s*\\/\\*+)", "beginCaptures": { "2": { "name": "punctuation.section.comment.haml" } }, "end": "^(?!\\1\\s+|\\n)", "name": "comment.block.haml", "patterns": [{ "include": "text.haml" }] }, { "begin": "^\\s*(?:((%)([-\\w:]+))|(?=\\.|#))", "captures": { "1": { "name": "meta.tag.haml" }, "2": { "name": "punctuation.definition.tag.haml" }, "3": { "name": "entity.name.tag.haml" } }, "end": "$|(?!\\.|#|\\{|\\(|\\[|&amp;|=|-|~|!=|&=|/)", "patterns": [{ "begin": "==", "contentName": "string.quoted.double.ruby", "end": "$\\n?", "patterns": [{ "include": "#interpolated_ruby" }] }, { "captures": { "1": { "name": "entity.other.attribute-name.class" } }, "match": "(\\.[\\w\\-\\:]+)", "name": "meta.selector.css" }, { "captures": { "1": { "name": "entity.other.attribute-name.id" } }, "match": "(#[\\w-]+)", "name": "meta.selector.css" }, { "begin": "(?<!\\#)\\{(?=.*(,|(do)|\\{|\\}|\\||(\\#.*)|\\R)\\s*)", "end": "\\s*\\}(?!\\s*\\,)(?!\\s*\\|)(?!\\#\\{.*\\})", "name": "meta.section.attributes.haml", "patterns": [{ "include": "source.ruby" }, { "include": "#continuation" }, { "include": "#rubyline" }] }, { "begin": "\\(", "end": "\\)", "name": "meta.section.attributes.plain.haml", "patterns": [{ "match": "([\\w-]+)", "name": "constant.other.symbol.ruby" }, { "match": "\\=", "name": "punctuation" }, { "include": "#variables" }, { "begin": '"', "end": '"', "name": "string.quoted.double.ruby", "patterns": [{ "match": "\\\\(x\\h{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)", "name": "constant.character.escape.ruby" }, { "include": "#interpolated_ruby" }] }, { "include": "#interpolated_ruby" }] }, { "begin": "\\[(?=.+(,|\\[|\\]|\\||(\\#.*))\\s*)", "end": "\\s*\\](?!.*(?!\\#\\[)\\])", "name": "meta.section.object.haml", "patterns": [{ "include": "source.ruby" }, { "include": "#continuation" }, { "include": "#rubyline" }] }, { "include": "#interpolated_ruby_line" }, { "include": "#rubyline" }, { "match": "/", "name": "punctuation.terminator.tag.haml" }] }, { "begin": "^(\\s*):(ruby|opal)$", "end": "^(?!\\1\\s+|$\\n*)", "name": "source.ruby.embedded.filter.haml", "patterns": [{ "include": "source.ruby" }] }, { "begin": "^(\\s*):ruby$", "end": "^(?!\\1\\s+|$\\n*)", "name": "source.ruby.embedded.filter.haml", "patterns": [{ "include": "source.ruby" }] }, { "begin": "^(\\s*):(style|sass)$", "end": "^(?=\\1\\s+|$\\n*)", "name": "source.sass.embedded.filter.haml", "patterns": [{ "include": "source.sass" }] }, { "begin": "^(\\s*):coffee(script)?", "end": "^(?!\\1\\s+|$\\n*)", "name": "source.coffee.embedded.filter.haml", "patterns": [{ "include": "source.coffee" }] }, { "begin": "^(\\s*):plain$", "end": "^(?=\\1\\s+|$\\n*)", "name": "text.plain.embedded.filter.haml", "patterns": [{ "include": "text.plain" }] }, { "begin": "^(\\s*)(:ruby)", "beginCaptures": { "2": { "name": "keyword.control.filter.haml" } }, "end": "(?m:(?<=\\n)(?!\\1\\s+|$\\n*))", "name": "
var haml = [
...ruby,
...javascript,
...sass,
...coffee,
...markdown,
...css,
lang
];
export { haml as default };