mirror of
https://github.com/requarks/wiki.git
synced 2025-02-25 18:55:30 -06:00
Use global replace for analytics header templates
Replace multiple instances of the same template variable in analytics templates
This commit is contained in:
parent
0e851eade9
commit
290b53b6e3
@ -117,7 +117,7 @@ module.exports = class Analytics extends Model {
|
||||
code.bodyEnd = _.defaultTo(code.bodyEnd, '')
|
||||
|
||||
_.forOwn(provider.config, (value, key) => {
|
||||
code.head = _.replace(code.head, `{{${key}}}`, value)
|
||||
code.head = _.replace(code.head, new RegExp(`{{${key}}}`, 'g'), value)
|
||||
code.bodyStart = _.replace(code.bodyStart, `{{${key}}}`, value)
|
||||
code.bodyEnd = _.replace(code.bodyEnd, `{{${key}}}`, value)
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user