This repository has been archived by the owner on Mar 17, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(index): escape invalid characters (#43)
* Handle special whitespace characters. If your raw text has a string with Line separator or Paragraph separator, they need to be handled outside of JSON.stringify: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#Issue_with_plain_JSON.stringify_for_use_as_JavaScript The fix here is to replace those characters as directed in the MDN article above. I also changed the formatting from tabs to 2 spaces :-p * Address code review. * Rename some variables. * Remove cacheable. Turns out cacheable is only used in webpack 1. So we are removing it.
- Loading branch information