wiledal / gulp-include

Enables functionality similar to that of snockets / sprockets or other file insertion compilation tools.
157 stars 68 forks source link

replace #44

Closed Riim closed 9 years ago

Riim commented 9 years ago

replace

content = content.replace(matches[i], replaceContent);

to

content = content.replace(matches[i], function() { return replaceContent; });

specials: $$, $&, $`, $', $n, $nn

'abc'.replace('b', "1$'")
=> "a1cc"

'abc'.replace('b', function() { return "1$'"; })
=> "a1$'c"
wiledal commented 9 years ago

This has been implemented, thanks!