Open jagot opened 5 years ago
:+1: to everything. For the unicode stuff -- a character class [¹²³⁴⁵⁶⁷⁸⁹]
+ a replace(s, '¹' => '1', ...)
call should be sufficient? The superscripts are all single characters in Unicode as far as I can tell.
After 6e8c33d, what remains to implement in this issue is the format c"1s( 2)"
, which can be done later is we want it.
Do we want to support variations of the string formats used to specify configurations and terms?
E.g., in addition to
c"1s2"
and T"1S" we could also supportc"1s²"
andT"¹S"
, which improve readability of the source code (this is how the configurations and terms are printed, anyway), andc"1s( 2)"
, which is a commonly used format in other codes and would simplify copying-and-pasting.The first option would require some unicode-regex magic, which might be non-trivial, the second option should be easy. To keep things simple, we should not allow mixing of formats within the same string.