Tools for the unicode Linter #
The actual linter is defined in TextBased.lean.
This file defines the allowlist and other tools used by the linter.
When changing, make sure to stay in sync with style guide
Following any unicode character, this indicates that the emoji variant should be displayed
Instances For
Following any unicode character, this indicates that the text variant should be displayed
Instances For
Prints a unicode character's codepoint in hexadecimal with prefix 'U+'. E.g., 'a' is "U+0061".
Instances For
Prints all characters in a string in hexadecimal with prefix 'U+'. E.g., "ab" is "U+0061;U+0062".
Instances For
Unicode symbols in mathlib that should always be followed by the emoji variant selector.
Instances For
Unicode symbols in mathlib that should always be followed by the text variant selector.
Instances For
If false, the character is not allowed in Mathlib.
Implemented using an allowlist consisting of:
- certain ASCII characters
- characters with abbreviations in the VSCode extension (
withVSCodeAbbrev) - "the rest" (
othersInMathlib)
Note: if true, a character might still not be allowed depending on context
(e.g. misplaced variant selectors).