vue-files-preview-inno
Version:
A tool for previewing files such as doc, excel, pdf, image, markdown, txt, audio, and video and so on.
93 lines (92 loc) • 1.94 kB
JavaScript
var n, i;
function g() {
if (i) return n;
i = 1;
function r(t) {
const c = t.regex, e = "HTTP/([32]|1\\.[01])", l = /[A-Za-z][A-Za-z0-9-]*/, a = {
className: "attribute",
begin: c.concat("^", l, "(?=\\:\\s)"),
starts: { contains: [
{
className: "punctuation",
begin: /: /,
relevance: 0,
starts: {
end: "$",
relevance: 0
}
}
] }
}, s = [
a,
{
begin: "\\n\\n",
starts: {
subLanguage: [],
endsWithParent: !0
}
}
];
return {
name: "HTTP",
aliases: ["https"],
illegal: /\S/,
contains: [
// response
{
begin: "^(?=" + e + " \\d{3})",
end: /$/,
contains: [
{
className: "meta",
begin: e
},
{
className: "number",
begin: "\\b\\d{3}\\b"
}
],
starts: {
end: /\b\B/,
illegal: /\S/,
contains: s
}
},
// request
{
begin: "(?=^[A-Z]+ (.*?) " + e + "$)",
end: /$/,
contains: [
{
className: "string",
begin: " ",
end: " ",
excludeBegin: !0,
excludeEnd: !0
},
{
className: "meta",
begin: e
},
{
className: "keyword",
begin: "[A-Z]+"
}
],
starts: {
end: /\b\B/,
illegal: /\S/,
contains: s
}
},
// to allow headers to work even without a preamble
t.inherit(a, { relevance: 0 })
]
};
}
return n = r, n;
}
export {
g as __require
};
//# sourceMappingURL=http.mjs.map