Skip to content

Commit

Permalink
Update math symbols that are valid identifiers (#103)
Browse files Browse the repository at this point in the history
Allow the following symbols (some were already allowed):
  - Quantifiers: `∀, ∃, ∄`
  - Big operators: `∑, ∏, ∐`
  - Differential symbols: `∂, ∆, ∇`
  - Integral symbols: `∫, ∬, ∭, ∮, ∯, ∰, ∱, ∲, ∳`
  - Other symbols: `∅, ∎`
  • Loading branch information
savq committed Jun 20, 2023
1 parent fb867fd commit 4d4dc7d
Show file tree
Hide file tree
Showing 3 changed files with 4,571 additions and 4,571 deletions.
2 changes: 1 addition & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -1110,7 +1110,7 @@ module.exports = grammar({
.replace(/!/g, '');

// Some symbols in Sm and So unicode categories that are identifiers
const validMathSymbols = "∂∇∏∑°";
const validMathSymbols = "°∀-∇∎-∑∫-∳";

const start = `[_\\p{XID_Start}${validMathSymbols}\\p{Emoji}&&[^0-9#*]]`;
const rest = `[^"'\`\\s\\.\\-\\[\\]${nonIdentifierCharacters }]*`;
Expand Down
Loading

0 comments on commit 4d4dc7d

Please sign in to comment.