Wordpress/package.json
Gary Pendergast f780ce0a49 Emoji: Port the Twemoji regex to PHP.
Previously, `wp_encode_emoji()` and `wp_staticize_emoji()` used inaccurate regular expressions to find emoji, and transform then into HTML entities or `<img>`s, respectively. This would result in emoji not being correctly transformed, or occasionally, non-emoji being incorrectly transformed.

This commit adds a new `grunt` task - `grunt precommit:emoji`. It finds the regex in `twemoji.js`, transforms it into a PHP-friendly version, and adds it to `formatting.php`. This task is also automatically run by `grunt precommit`, when it detects that `twemoji.js` has changed.

The new regex requires features introduced in PCRE 8.32, which was introduced in PHP 5.4.14, though it was also backported to later releases of the PHP 5.3 series. For versions of PHP that don't support this, it will fall back to an updated version of the loose-matching regex.

For short posts, the performance difference between the old and new regex is negligible. As the posts get longer, however, the new method is exponentially faster.

Fixes #35293.



git-svn-id: https://develop.svn.wordpress.org/trunk@41043 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-14 05:46:19 +00:00

39 lines
1.1 KiB
JSON

{
"name": "WordPress",
"version": "4.9.0",
"description": "WordPress is web software you can use to create a beautiful website or blog.",
"repository": {
"type": "svn",
"url": "https://develop.svn.wordpress.org/trunk"
},
"engines": {
"node": "6.9.1"
},
"author": "The WordPress Contributors",
"license": "GPL-2.0+",
"devDependencies": {
"autoprefixer": "^6.5.1",
"grunt": "~0.4.5",
"grunt-browserify": "~5.0.0",
"grunt-contrib-clean": "~1.0.0",
"grunt-contrib-compress": "~1.3.0",
"grunt-contrib-concat": "~1.0.0",
"grunt-contrib-copy": "~1.0.0",
"grunt-contrib-cssmin": "~1.0.2",
"grunt-contrib-imagemin": "~1.0.0",
"grunt-contrib-jshint": "~1.0.0",
"grunt-contrib-qunit": "^1.2.0",
"grunt-contrib-uglify": "~2.0.0",
"grunt-contrib-watch": "~1.0.0",
"grunt-includes": "~0.5.1",
"grunt-jsvalidate": "~0.2.2",
"grunt-legacy-util": "^0.2.0",
"grunt-patch-wordpress": "~0.4.2",
"grunt-postcss": "~0.7.1",
"grunt-replace": "~1.0.1",
"grunt-rtlcss": "~2.0.1",
"grunt-sass": "~1.2.1",
"matchdep": "~1.0.0"
}
}