mirror of
https://github.com/twitter/twemoji.git
synced 2024-06-15 03:35:16 +00:00
Refactor regex file to be reusable in the preview script
This commit is contained in:
parent
0dd7c46f41
commit
bc6a2c6a87
@ -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
Loading…
Reference in New Issue
Block a user