From 2cd07ac36e932d896b051d91f7a3c6a7b55b632c Mon Sep 17 00:00:00 2001 From: rocky Date: Sat, 4 Sep 2021 18:58:49 -0400 Subject: [PATCH] Tolerate Unicode DifferentialD We are in the process of preferring Unicode symbols over custom WL symbols on input (when they are different) since our frontends use standard Unicode when they support Unicode. --- mathics/core/expression.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mathics/core/expression.py b/mathics/core/expression.py index 296ea8560..4fdeef234 100644 --- a/mathics/core/expression.py +++ b/mathics/core/expression.py @@ -2916,6 +2916,7 @@ def render(format, string, in_text=False): elif text and text[0] in "0123456789-.": return render("%s", text) else: + # FIXME: this should be done in a better way. if text == "\u2032": return "'" elif text == "\u2032\u2032": @@ -2938,7 +2939,8 @@ def render(format, string, in_text=False): return text elif text == "\u222b": return r"\int" - elif text == "\u2146": + # Tolerate WL or Unicode DifferentialD + elif text in ("\u2146", "\U0001D451"): return r"\, d" elif text == "\u2211": return r"\sum"