How can I escape forward slashes in patterns?
Bencsi opened this issue · 4 comments
Bencsi commented
The pattern 'match' and 'replacement' contains forward slashes (/), the task throw an error.
Here is a piece of my code:
font: {
options: {
patterns: [
{
match: '(../fonts/',
replacement: '../font/'
}
],
usePrefix: false
},
files: [
{expand: true, flatten: true, src: ['web/css/vendor.css'], dest: ''}
]
}
outaTiME commented
Hi pal, can you sendme the error ??? you coud try the following:
font: {
options: {
patterns: [
{
match: /\(\.\.\/fonts\//g,
replacement: '../font/'
}
]
},
files: [
{expand: true, flatten: true, src: ['web/css/vendor.css'], dest: ''}
]
}
outaTiME commented
Im try your code and i get exception too ...
I will realase new version soon ... the issue come from https://github.com/outaTiME/applause library ...
thks !!
outaTiME commented
heeey, im just release the new grunt-replace
version the 0.8.0 check it out plz ...
Bencsi commented
Works fine, thx.