Update string handling to handle SMP unicode blocks better. #504
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR updates the string-handling functions to take advantage of some ES6 string functions (
fromCodePoint()
,codePointAt()
, and the fact thatArray.from()
splits a string into an array of unicode characters). It also enhances the TeX parser string handling to handle unicode characters better. E.g., you can use a (single) unicode character as a macro name (e.g.,\α
) or as an argument (e.g.\sqrt α
) or in macro definition templates (e.g.,\def\x #1α{[#1]}
so that\x abcα
will produce[abc]
), and so on.