prism-code-editor
Version:
Lightweight, extensible code editor component for the web using Prism
30 lines (29 loc) • 702 B
JavaScript
import { l as t } from "../prismCore-5c7f03d0.js";
t.bbcode = {
tag: {
pattern: /\[\/?[^\s=\]]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+))?(?:\s+[^\s=\]]+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+))*\s*\]/,
inside: {
tag: {
pattern: /^\[\/?[^\s=\]]+/,
inside: {
punctuation: /^\[\/?/
}
},
"attr-value": {
pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+)/,
inside: {
punctuation: [
/^=/,
{
pattern: /^(\s*)["']|["']$/,
lookbehind: !0
}
]
}
},
punctuation: /\]/,
"attr-name": /[^\s=\]]+/
}
}
};
t.shortcode = t.bbcode;