mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 06:46:26 +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 |
||
---|---|---|
.docs | ||
demos | ||
maintenance | ||
modules | ||
.csslintrc | ||
.gitignore | ||
.gitreview | ||
.jshintignore | ||
.jshintrc | ||
ApiVisualEditor.php | ||
ApiVisualEditorEdit.php | ||
AUTHORS.txt | ||
CODING.md | ||
Gruntfile.js | ||
LICENSE.txt | ||
package.json | ||
README.txt | ||
VisualEditor.hooks.php | ||
VisualEditor.i18n.php | ||
VisualEditor.php | ||
VisualEditorMessagesModule.php |
VisualEditor provides a visual editor for wiki pages. It is written in JavaScript and runs in a web browser. It uses the Parsoid parser to convert wikitext documents to annotated HTML which the VisualEditor is able to load, modify and emit back to Parsoid at which point it is converted back into wikitext. For more information about these projects, check out the wiki: * http://www.mediawiki.org/wiki/VisualEditor * http://www.mediawiki.org/wiki/Parsoid