1
0
mirror of https://github.com/twitter/twemoji.git synced 2024-07-05 12:28:51 +00:00

Refactor regex file to be reusable in the preview script

This commit is contained in:
Nathan Downs 2018-06-27 10:52:57 -07:00
parent 0dd7c46f41
commit bc6a2c6a87
2 changed files with 2 additions and 2 deletions

View File

@ -1057,7 +1057,7 @@ function createTwemoji(re) {
// drop current indentation
.replace(/^ /gm, '')
// add the RegExp in the right place
.replace('re = /twemoji/', `re = ${fs.readFileSync(path.join(__dirname, 'regex')).toString().trim()}`)
.replace('re = /twemoji/', `re = /${fs.readFileSync(path.join(__dirname, 'regex')).toString().trim()}/g`)
// add the full license
.replace('/*! (C) Twitter Inc. */',
'/*! (C) Twitter Inc. *//*\n' +

File diff suppressed because one or more lines are too long