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".
Equations
- Mathlib.Linter.TextBased.UnicodeLinter.Char.printCodepointHex c = ("U+".append ("0000".drop (Nat.toDigits 16 c.val.toNat).length).toString).append (String.ofList (Nat.toDigits 16 c.val.toNat))
Instances For
Prints all characters in a string in hexadecimal with prefix 'U+'. E.g., "ab" is "U+0061;U+0062".
Equations
Instances For
Unicode symbols in mathlib that should always be followed by the emoji variant selector.
Equations
- One or more equations did not get rendered due to their size.
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).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Provide default replacement (String) for a disallowed character, or none if none defined
Equations
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed '\t' = some " "
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed '\x0b' = some "\n"
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed '\x0c' = some "\n"
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed '\x0d' = some "\n"
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed '\x1f' = some ""
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed ' ' = some " "
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed ' ' = some " "
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed ' ' = some " "
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed ' ' = some " "
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed ' ' = some " "
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed ' ' = some " "
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed ' ' = some " "
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed ' ' = some " "
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed ' ' = some " "
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed ' ' = some " "
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed ' ' = some " "
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed ' ' = some " "
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed ' ' = some " "
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed '' = some ""
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed '' = some ""
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed '' = some ""
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed '' = some ""
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed '' = some ""
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed ' ' = some " "
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed ' ' = some " "
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed '' = some ""
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed '' = some ""
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed '' = some ""
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed '' = some ""
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed '' = some ""
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed ' ' = some " "
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed ' ' = some " "
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed '' = some ""
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed '' = some ""
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed '' = some ""
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed '' = some ""
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed '' = some ""
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed '' = some ""
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed '' = some ""
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed '' = some ""
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed '' = some ""
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed '' = some ""
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed '' = some ""
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed '' = some ""
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed '' = some ""
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed '' = some ""
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed ' ' = some " "
- Mathlib.Linter.TextBased.UnicodeLinter.replaceDisallowed x✝ = none