[Error] When empty is true, replace endTag by startTag
11joselu opened this issue · 1 comments
11joselu commented
Code example (inyecting into jsp file):
pipe($.inject(src(file), {
relative: true,
empty: true,
starttag: '<%-- analytics:{{ext}} --%>',
endtag: '<%-- endanalytics --%>'
}))
slhenty commented
I have the same problem... and I've discovered where the bug is (line 147 in https://github.com/klei/gulp-inject/blob/master/src/inject/index.js)
Currently is:
var endTag = getTagRegExp(opt.tags.end(targetExt, ext, opt.starttag), ext, opt);
Should be:
var endTag = getTagRegExp(opt.tags.end(targetExt, ext, opt.endtag), ext, opt);
I'm planning to start the fix and submit a PR, ASAP.