mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 02:23:58 +00:00
f9c41c754b
The old regex was lifted from PHP, which matches on UTF-8 byte sequences. In PHP, [...\x80-\xFF]+ matches any bytes with the high bit set, which by the particular properties of UTF-8 will match any sequence which represents a Unicode character above U+007F. In Javascript, regex matching is on UTF-16 Unicode code units, so we don't have to do byte sequence matching (and cannot do so). So the equivalent Javascript regex should use [...\u0080-\uFFFF]+, to match any code unit above U+007F directly. (It also matches surrogate pairs, by the particular properties of UTF-16, so any Unicode codepoint above U+007F is matched). Change-Id: I674b89f757b60331dd1cb23fd7ff8b18775012e9 |
||
---|---|---|
.. | ||
ve.ui.MWAlienExtensionInspector.js | ||
ve.ui.MWExtensionInspector.js | ||
ve.ui.MWHieroInspector.js | ||
ve.ui.MWLinkInspector.js | ||
ve.ui.MWMathInspector.js |