This repository was archived by the owner on Mar 17, 2021. It is now read-only.
Commit 83f6541
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.1 parent e234bde commit 83f6541
1 file changed
+10
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
9 | 13 | | |
0 commit comments