Closed Fauntleroy closed 11 years ago
The replace helper should provide basic string replacement functionality. Users should be able to provide a string to replace and a replacement.
replace
url
http://sparkart.com/images/cats.jpg
Handlebars
<!-- Replace helper with arguments: sparkart.com cdn.sparkart.com --> <img src="{{#replace url sparkart.com cdn.sparkart.com}}" />
Output
<!-- Replace helper with arguments: sparkart.com cdn.sparkart.com --> <img src="http://cdn.sparkart.com/images/cats.jpg" />
@pushred is this sufficient for your CDN url replacement use case?
That'll do it!
The
replace
helper should provide basic string replacement functionality. Users should be able to provide a string to replace and a replacement.url
Handlebars
Output