diff options
Diffstat (limited to 'public/prism/prism-excel-formula.min.js')
| -rw-r--r-- | public/prism/prism-excel-formula.min.js | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/public/prism/prism-excel-formula.min.js b/public/prism/prism-excel-formula.min.js new file mode 100644 index 0000000..838e1fc --- /dev/null +++ b/public/prism/prism-excel-formula.min.js @@ -0,0 +1,43 @@ +(Prism.languages['excel-formula'] = { + comment: { + pattern: /(\bN\(\s*)"(?:[^"]|"")*"(?=\s*\))/i, + lookbehind: !0, + greedy: !0, + }, + string: { pattern: /"(?:[^"]|"")*"(?!")/, greedy: !0 }, + reference: { + pattern: + /(?:'[^']*'|(?:[^\s()[\]{}<>*?"';,$&]*\[[^^\s()[\]{}<>*?"']+\])?\w+)!/, + greedy: !0, + alias: 'string', + inside: { + operator: /!$/, + punctuation: /'/, + sheet: { pattern: /[^[\]]+$/, alias: 'function' }, + file: { pattern: /\[[^[\]]+\]$/, inside: { punctuation: /[[\]]/ } }, + path: /[\s\S]+/, + }, + }, + 'function-name': { pattern: /\b[A-Z]\w*(?=\()/i, alias: 'keyword' }, + range: { + pattern: + /\$?\b(?:[A-Z]+\$?\d+:\$?[A-Z]+\$?\d+|[A-Z]+:\$?[A-Z]+|\d+:\$?\d+)\b/i, + alias: 'property', + inside: { + operator: /:/, + cell: /\$?[A-Z]+\$?\d+/i, + column: /\$?[A-Z]+/i, + row: /\$?\d+/, + }, + }, + cell: { + pattern: /\b[A-Z]+\d+\b|\$[A-Za-z]+\$?\d+\b|\b[A-Za-z]+\$\d+\b/, + alias: 'property', + }, + number: /(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[+-]?\d+)?\b/i, + boolean: /\b(?:FALSE|TRUE)\b/i, + operator: /[-+*/^%=&,]|<[=>]?|>=?/, + punctuation: /[[\]();{}|]/, +}), + (Prism.languages.xlsx = Prism.languages.xls = + Prism.languages['excel-formula']); |
