d1191adce6
* Add exceptions for html escape usage in href and src attributes. * Add new test cases. * Remove useless spaces. * Do not escape if the parser does not do so. * Implement a different heuristic for keeping along with the parser. * Update tests. * Forgot passing options as param. * Experimental alternative implementation. * Remove other function. * Push test after merge. * Update getJsXRawValue in order to return the unprocessed raw value. Latest Babylon version includes a fix that allow us to directly inject the unprocessed raw value available in the `extra.rawValue` property of the node. A last transformation is applied by replacing double quotes to `"` entities. * Drop unused htmlEscapeInsideDoubleQuote function. * Move getJSXRawValue function logic to the its only call, drop it. A simple check is performed to determine if the parser is babylon or flow via `n.value.extra`. Thus, the corresponding raw value is extracted. If we are converting a string from single quotes to double quotes, we need to make sure that double quotes are converted to ". * Remove ambiguous comment. * Add Babylon parser. * Update test cases accordingly, revert regression introduced previously. |
||
---|---|---|
.. | ||
__snapshots__ | ||
expression.js | ||
html_escape.js | ||
hug.js | ||
jsfmt.spec.js | ||
object-property.js | ||
open-break.js | ||
parens.js | ||
quotes.js |