Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excel: Use more fitting aliases for function-name, range, cell #3391

Merged
merged 1 commit into from Mar 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions components/prism-excel-formula.js
Expand Up @@ -39,11 +39,11 @@ Prism.languages['excel-formula'] = {
},
'function-name': {
pattern: /\b[A-Z]\w*(?=\()/i,
alias: 'keyword'
alias: 'builtin'
},
'range': {
pattern: /\$?\b(?:[A-Z]+\$?\d+:\$?[A-Z]+\$?\d+|[A-Z]+:\$?[A-Z]+|\d+:\$?\d+)\b/i,
alias: 'property',
alias: 'selector',
inside: {
'operator': /:/,
'cell': /\$?[A-Z]+\$?\d+/i,
Expand All @@ -55,7 +55,7 @@ Prism.languages['excel-formula'] = {
// Excel is case insensitive, so the string "foo1" could be either a variable or a cell.
// To combat this, we match cells case insensitive, if the contain at least one "$", and case sensitive otherwise.
pattern: /\b[A-Z]+\d+\b|\$[A-Za-z]+\$?\d+\b|\b[A-Za-z]+\$\d+\b/,
alias: 'property'
alias: 'selector'
},
'number': /(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[+-]?\d+)?\b/i,
'boolean': /\b(?:FALSE|TRUE)\b/i,
Expand Down
2 changes: 1 addition & 1 deletion components/prism-excel-formula.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.