You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When used with target ES2009 or ES2015, it outputs an empty string with no warning.
Output for ES2018 ([\P{M}\P{Lm}](?:(?:[\u035C\u0361]\P{M}\p{M}*)|\u200d|\p{M}|\p{Lm}|\p{Emoji_Modifier})*):
Should be matched atomically.
Doesn't match some emoji correctly (e.g., 🏳️🌈 or 👩🏻🏫), which is probably among the more common reasons to use \X.
It doesn't match \r\n (a very common grapheme) correctly.
The specific pattern used seems a bit arbitrary. I understand that it's meant to be an approximation, but I'm not sure what the details are based on. E.g., the inclusion of only U+035C and U+0361 at the position they're at seems arbitrary (unless there's something I'm missing), and also something like 'A\u035CA' should be counted as two graphemes, not one. Etc.
IMO it would be preferable to simplify or otherwise adjust the approximation to something easily understandable/explainable that only has false negatives (rather than a mixture of false positives and negatives).
The text was updated successfully, but these errors were encountered:
When used with target ES2009 or ES2015, it outputs an empty string with no warning.
warnings are not printed to stderr, they are part of the return value (or raised when using the ::new! constructor).
JsRegex.new(/\X/)=>#<JsRegex:0x000000011bddc9a0@options="",@source="",@target="ES2009",@warnings=["Dropped unsupported xgrapheme type '\\X' at index 0"]>
The output for
\X
has some issues:[\P{M}\P{Lm}](?:(?:[\u035C\u0361]\P{M}\p{M}*)|\u200d|\p{M}|\p{Lm}|\p{Emoji_Modifier})*
):\X
.\r\n
(a very common grapheme) correctly.'A\u035CA'
should be counted as two graphemes, not one. Etc.IMO it would be preferable to simplify or otherwise adjust the approximation to something easily understandable/explainable that only has false negatives (rather than a mixture of false positives and negatives).
The text was updated successfully, but these errors were encountered: