vue-files-preview-inno
Version:
A tool for previewing files such as doc, excel, pdf, image, markdown, txt, audio, and video and so on.
149 lines (148 loc) • 3.28 kB
JavaScript
var r, t;
function c() {
if (t) return r;
t = 1;
function s(e) {
const n = e.regex, a = {
className: "variable",
variants: [
{ begin: /\$\d+/ },
{ begin: /\$\{\w+\}/ },
{ begin: n.concat(/[$@]/, e.UNDERSCORE_IDENT_RE) }
]
}, i = {
endsWithParent: !0,
keywords: {
$pattern: /[a-z_]{2,}|\/dev\/poll/,
literal: [
"on",
"off",
"yes",
"no",
"true",
"false",
"none",
"blocked",
"debug",
"info",
"notice",
"warn",
"error",
"crit",
"select",
"break",
"last",
"permanent",
"redirect",
"kqueue",
"rtsig",
"epoll",
"poll",
"/dev/poll"
]
},
relevance: 0,
illegal: "=>",
contains: [
e.HASH_COMMENT_MODE,
{
className: "string",
contains: [
e.BACKSLASH_ESCAPE,
a
],
variants: [
{
begin: /"/,
end: /"/
},
{
begin: /'/,
end: /'/
}
]
},
// this swallows entire URLs to avoid detecting numbers within
{
begin: "([a-z]+):/",
end: "\\s",
endsWithParent: !0,
excludeEnd: !0,
contains: [a]
},
{
className: "regexp",
contains: [
e.BACKSLASH_ESCAPE,
a
],
variants: [
{
begin: "\\s\\^",
end: "\\s|\\{|;",
returnEnd: !0
},
// regexp locations (~, ~*)
{
begin: "~\\*?\\s+",
end: "\\s|\\{|;",
returnEnd: !0
},
// *.example.com
{ begin: "\\*(\\.[a-z\\-]+)+" },
// sub.example.*
{ begin: "([a-z\\-]+\\.)+\\*" }
]
},
// IP
{
className: "number",
begin: "\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"
},
// units
{
className: "number",
begin: "\\b\\d+[kKmMgGdshdwy]?\\b",
relevance: 0
},
a
]
};
return {
name: "Nginx config",
aliases: ["nginxconf"],
contains: [
e.HASH_COMMENT_MODE,
{
beginKeywords: "upstream location",
end: /;|\{/,
contains: i.contains,
keywords: { section: "upstream location" }
},
{
className: "section",
begin: n.concat(e.UNDERSCORE_IDENT_RE + n.lookahead(/\s+\{/)),
relevance: 0
},
{
begin: n.lookahead(e.UNDERSCORE_IDENT_RE + "\\s"),
end: ";|\\{",
contains: [
{
className: "attribute",
begin: e.UNDERSCORE_IDENT_RE,
starts: i
}
],
relevance: 0
}
],
illegal: "[^\\s\\}\\{]"
};
}
return r = s, r;
}
export {
c as __require
};
//# sourceMappingURL=nginx.mjs.map