MrSwitch / esi

Edge Side Includes processing for Node environments
https://www.npmjs.org/package/esi
23 stars 8 forks source link

Dictionnary replace when not in `tag` ? #4

Closed Hadrien-DELAITRE closed 8 years ago

Hadrien-DELAITRE commented 8 years ago

Why are you replacing string when it's not a tag : https://github.com/MrSwitch/esi/blob/master/src/esi.js#L70

In my htmlString, I have other script containing such characters as : function _callee$(_context) {. They are replaced by : function _callee {.

Obviously when my page is served client side, javascript fails.

MrSwitch commented 8 years ago

If you want to remove that. Check the test script is successful. Then create a PR. Thanks

MrSwitch commented 8 years ago

Thanks, just released npm i esi@* --save-dev