mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-14 04:39:23 +00:00
Fixes #11220. Replaces the sed script for matching emoji in ios prepRelease with a tiny node project that uses emoji-regex package, to reduce future maintenance. Also strips lingering emoji and :xxx: emoji shortcut strings from HISTORY.md. Note that :xxx: are not stripped programatically at this time.
18 lines
No EOL
461 B
JavaScript
18 lines
No EOL
461 B
JavaScript
|
|
const emojiRegex = require('emoji-regex');
|
|
|
|
process.stdin.setEncoding('utf-8');
|
|
|
|
// We will concatenate all strings and assume we are not processing a huge file,
|
|
// so we don't break in the middle of a UTF-8 sequence or split emoji sequences
|
|
// in half.
|
|
|
|
let stream = '';
|
|
process.stdin.on('readable', () => {
|
|
const data = process.stdin.read();
|
|
if(data) {
|
|
stream += data;
|
|
} else {
|
|
process.stdout.write(stream.replaceAll(emojiRegex(), ''));
|
|
}
|
|
}); |