prism-code-editor
Version:
Lightweight, extensible code editor component for the web using Prism
29 lines (28 loc) • 616 B
JavaScript
import { l as t } from "../prismCore-5c7f03d0.js";
t.editorconfig = {
// https://editorconfig-specification.readthedocs.io
comment: /[;#].*/,
section: {
pattern: /(^[ \t]*)\[.+\]/m,
lookbehind: !0,
alias: "selector",
inside: {
regex: /\\\\[\[\]{},!?.*]/,
// Escape special characters with '\\'
operator: /[!?]|\.\.|\*{1,2}/,
punctuation: /[\[\]{},]/
}
},
key: {
pattern: /(^[ \t]*)[^\s=]+(?=[ \t]*=)/m,
lookbehind: !0,
alias: "attr-name"
},
value: {
pattern: /=.*/,
alias: "attr-value",
inside: {
punctuation: /^=/
}
}
};