UNPKG

prism-code-editor

Version:

Lightweight, extensible code editor component for the web using Prism

39 lines (38 loc) 935 B
import { a as languages } from "../../core-8vQkh0Rd.js"; //#region src/prism/languages/systemd.js var comment = /^[;#].*/gm; var quotesSource = "\"(?:\\\\[\\s\\S]|[^\\\\\n\"])*\"(?!\\S)"; languages.systemd = { "comment": comment, "section": { pattern: /^\[[^\n[\]]*\](?=[ ]*$)/gm, inside: { "punctuation": /^\[|\]$/, "section-name": { pattern: /[^]+/, alias: "selector" } } }, "key": { pattern: /^[^\s=]+(?=[ ]*=)/gm, alias: "attr-name" }, "value": { pattern: RegExp(`(=[ ]*(?!\\s))(?:[^\\\\\\s]|[ ]+(?:(?![ "])|${quotesSource})|\\\\\n+(?:[#;].*\n+)*(?![#;]))+`, "g"), lookbehind: true, alias: "attr-value", inside: { "comment": comment, "quoted": { pattern: RegExp("(^|\\s)" + quotesSource, "g"), lookbehind: true }, "punctuation": /\\$/m, "boolean": /^(?:false|true|no|off|on|yes)$/g } }, "punctuation": /=/ }; //#endregion //# sourceMappingURL=systemd.js.map