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

22 lines
16 KiB
JavaScript
Raw Permalink Normal View History

2024-10-14 06:09:33 +00:00
import javascript from './javascript.mjs';
import css from './css.mjs';
import sass from './sass.mjs';
import scss from './scss.mjs';
import stylus from './stylus.mjs';
import coffee from './coffee.mjs';
import html from './html.mjs';
const lang = Object.freeze({ "displayName": "Pug", "name": "pug", "patterns": [{ "comment": "Doctype declaration.", "match": "^(!!!|doctype)(\\s*[a-zA-Z0-9-_]+)?", "name": "meta.tag.sgml.doctype.html" }, { "begin": "^(\\s*)//-", "comment": "Unbuffered (pug-only) comments.", "end": "^(?!(\\1\\s)|\\s*$)", "name": "comment.unbuffered.block.pug" }, { "begin": "^(\\s*)//", "comment": "Buffered (html) comments.", "end": "^(?!(\\1\\s)|\\s*$)", "name": "string.comment.buffered.block.pug", "patterns": [{ "captures": { "1": { "name": "invalid.illegal.comment.comment.block.pug" } }, "comment": "Buffered comments inside buffered comments will generate invalid html.", "match": "^\\s*(//)(?!-)", "name": "string.comment.buffered.block.pug" }] }, { "begin": "<!--", "end": "--\\s*>", "name": "comment.unbuffered.block.pug", "patterns": [{ "match": "--", "name": "invalid.illegal.comment.comment.block.pug" }] }, { "begin": "^(\\s*)-$", "comment": "Unbuffered code block.", "end": "^(?!(\\1\\s)|\\s*$)", "name": "source.js", "patterns": [{ "include": "source.js" }] }, { "begin": "^(\\s*)(script)((\\.$)|(?=[^\\n]*((text|application)/javascript|module).*\\.$))", "beginCaptures": { "2": { "name": "entity.name.tag.pug" } }, "comment": "Script tag with JavaScript code.", "end": "^(?!(\\1\\s)|\\s*$)", "name": "meta.tag.other", "patterns": [{ "begin": "\\G(?=\\()", "end": "$", "patterns": [{ "include": "#tag_attributes" }] }, { "begin": "\\G(?=[.#])", "end": "$", "patterns": [{ "include": "#complete_tag" }] }, { "include": "source.js" }] }, { "begin": "^(\\s*)(style)((\\.$)|(?=[.#(].*\\.$))", "beginCaptures": { "2": { "name": "entity.name.tag.pug" } }, "comment": "Style tag with CSS code.", "end": "^(?!(\\1\\s)|\\s*$)", "name": "meta.tag.other", "patterns": [{ "begin": "\\G(?=\\()", "end": "$", "patterns": [{ "include": "#tag_attributes" }] }, { "begin": "\\G(?=[.#])", "end": "$", "patterns": [{ "include": "#complete_tag" }] }, { "include": "source.css" }] }, { "begin": "^(\\s*):(sass)(?=\\(|$)", "beginCaptures": { "2": { "name": "constant.language.name.sass.filter.pug" } }, "end": "^(?!(\\1\\s)|\\s*$)", "name": "source.sass.filter.pug", "patterns": [{ "include": "#tag_attributes" }, { "include": "source.sass" }] }, { "begin": "^(\\s*):(scss)(?=\\(|$)", "beginCaptures": { "2": { "name": "constant.language.name.scss.filter.pug" } }, "end": "^(?!(\\1\\s)|\\s*$)", "name": "source.css.scss.filter.pug", "patterns": [{ "include": "#tag_attributes" }, { "include": "source.css.scss" }] }, { "begin": "^(\\s*):(less)(?=\\(|$)", "beginCaptures": { "2": { "name": "constant.language.name.less.filter.pug" } }, "end": "^(?!(\\1\\s)|\\s*$)", "name": "source.less.filter.pug", "patterns": [{ "include": "#tag_attributes" }, { "include": "source.less" }] }, { "begin": "^(\\s*):(stylus)(?=\\(|$)", "beginCaptures": { "2": { "name": "constant.language.name.stylus.filter.pug" } }, "end": "^(?!(\\1\\s)|\\s*$)", "patterns": [{ "include": "#tag_attributes" }, { "include": "source.stylus" }] }, { "begin": "^(\\s*):(coffee(-?script)?)(?=\\(|$)", "beginCaptures": { "2": { "name": "constant.language.name.coffeescript.filter.pug" } }, "end": "^(?!(\\1\\s)|\\s*$)", "name": "source.coffeescript.filter.pug", "patterns": [{ "include": "#tag_attributes" }, { "include": "source.coffee" }] }, { "begin": "^(\\s*):(uglify-js)(?=\\(|$)", "beginCaptures": { "2": { "name": "constant.language.name.js.filter.pug" } }, "end": "^(?!(\\1\\s)|\\s*$)", "name": "source.js.filter.pug", "patterns": [{ "include": "#tag_attributes" }, { "include": "source.js" }] }, { "begin": "^(\\s*)((:(?=.))|(:$))", "beginCaptures": { "4": { "name": "invalid.illegal.empty.generic.filter.pug" } }, "comment": "Generic Pug filter.", "end": "^(?!(\\1\\s)|\\s*$)", "patterns": [{ "begin": "\\G(?<=:)(?=.)", "end": "$", "name": "name.generic.filter.pug", "patterns": [{ "match": "\\G\\(", "name": "invalid.illegal.name.generic.filter.pug" }, { "match": "[\\w-]", "name": "constant.language.name.generic.filter.pug" }, { "include": "#tag_attributes" }, { "match": "\\W", "name": "invalid.illegal.name.generic.filter.pug" }] }] }, { "
var pug = [
...javascript,
...css,
...sass,
...scss,
...stylus,
...coffee,
...html,
lang
];
export { pug as default };