UNPKG

vue-files-preview-inno

Version:

A tool for previewing files such as doc, excel, pdf, image, markdown, txt, audio, and video and so on.

383 lines (382 loc) 6.42 kB
var s, c; function k() { if (c) return s; c = 1; function o(e) { const i = e.regex, t = {}, r = { begin: /\$\{/, end: /\}/, contains: [ "self", { begin: /:-/, contains: [t] } // default values ] }; Object.assign(t, { className: "variable", variants: [ { begin: i.concat( /\$[\w\d#@][\w\d_]*/, // negative look-ahead tries to avoid matching patterns that are not // Perl at all like $ident$, @ident@, etc. "(?![\\w\\d])(?![$])" ) }, r ] }); const n = { className: "subst", begin: /\$\(/, end: /\)/, contains: [e.BACKSLASH_ESCAPE] }, m = e.inherit( e.COMMENT(), { match: [ /(^|\s)/, /#.*$/ ], scope: { 2: "comment" } } ), u = { begin: /<<-?\s*(?=\w+)/, starts: { contains: [ e.END_SAME_AS_BEGIN({ begin: /(\w+)/, end: /(\w+)/, className: "string" }) ] } }, a = { className: "string", begin: /"/, end: /"/, contains: [ e.BACKSLASH_ESCAPE, t, n ] }; n.contains.push(a); const d = { match: /\\"/ }, p = { className: "string", begin: /'/, end: /'/ }, l = { match: /\\'/ }, h = { begin: /\$?\(\(/, end: /\)\)/, contains: [ { begin: /\d+#[0-9a-f]+/, className: "number" }, e.NUMBER_MODE, t ] }, b = [ "fish", "bash", "zsh", "sh", "csh", "ksh", "tcsh", "dash", "scsh" ], f = e.SHEBANG({ binary: `(${b.join("|")})`, relevance: 10 }), g = { className: "function", begin: /\w[\w\d_]*\s*\(\s*\)\s*\{/, returnBegin: !0, contains: [e.inherit(e.TITLE_MODE, { begin: /\w[\w\d_]*/ })], relevance: 0 }, _ = [ "if", "then", "else", "elif", "fi", "for", "while", "until", "in", "do", "done", "case", "esac", "function", "select" ], E = [ "true", "false" ], S = { match: /(\/[a-z._-]+)+/ }, N = [ "break", "cd", "continue", "eval", "exec", "exit", "export", "getopts", "hash", "pwd", "readonly", "return", "shift", "test", "times", "trap", "umask", "unset" ], w = [ "alias", "bind", "builtin", "caller", "command", "declare", "echo", "enable", "help", "let", "local", "logout", "mapfile", "printf", "read", "readarray", "source", "sudo", "type", "typeset", "ulimit", "unalias" ], A = [ "autoload", "bg", "bindkey", "bye", "cap", "chdir", "clone", "comparguments", "compcall", "compctl", "compdescribe", "compfiles", "compgroups", "compquote", "comptags", "comptry", "compvalues", "dirs", "disable", "disown", "echotc", "echoti", "emulate", "fc", "fg", "float", "functions", "getcap", "getln", "history", "integer", "jobs", "kill", "limit", "log", "noglob", "popd", "print", "pushd", "pushln", "rehash", "sched", "setcap", "setopt", "stat", "suspend", "ttyctl", "unfunction", "unhash", "unlimit", "unsetopt", "vared", "wait", "whence", "where", "which", "zcompile", "zformat", "zftp", "zle", "zmodload", "zparseopts", "zprof", "zpty", "zregexparse", "zsocket", "zstyle", "ztcp" ], y = [ "chcon", "chgrp", "chown", "chmod", "cp", "dd", "df", "dir", "dircolors", "ln", "ls", "mkdir", "mkfifo", "mknod", "mktemp", "mv", "realpath", "rm", "rmdir", "shred", "sync", "touch", "truncate", "vdir", "b2sum", "base32", "base64", "cat", "cksum", "comm", "csplit", "cut", "expand", "fmt", "fold", "head", "join", "md5sum", "nl", "numfmt", "od", "paste", "ptx", "pr", "sha1sum", "sha224sum", "sha256sum", "sha384sum", "sha512sum", "shuf", "sort", "split", "sum", "tac", "tail", "tr", "tsort", "unexpand", "uniq", "wc", "arch", "basename", "chroot", "date", "dirname", "du", "echo", "env", "expr", "factor", // "false", // keyword literal already "groups", "hostid", "id", "link", "logname", "nice", "nohup", "nproc", "pathchk", "pinky", "printenv", "printf", "pwd", "readlink", "runcon", "seq", "sleep", "stat", "stdbuf", "stty", "tee", "test", "timeout", // "true", // keyword literal already "tty", "uname", "unlink", "uptime", "users", "who", "whoami", "yes" ]; return { name: "Bash", aliases: [ "sh", "zsh" ], keywords: { $pattern: /\b[a-z][a-z0-9._-]+\b/, keyword: _, literal: E, built_in: [ ...N, ...w, // Shell modifiers "set", "shopt", ...A, ...y ] }, contains: [ f, // to catch known shells and boost relevancy e.SHEBANG(), // to catch unknown shells but still highlight the shebang g, h, m, u, S, a, d, p, l, t ] }; } return s = o, s; } export { k as __require }; //# sourceMappingURL=bash.mjs.map