Add back accidentally removed semicolons to escape.js.

This commit is contained in:
John-David Dalton
2019-07-02 16:08:37 -07:00
parent 8bc17fe659
commit dce7fccbb6

View File

@@ -1,10 +1,10 @@
/** Used to map characters to HTML entities. */ /** Used to map characters to HTML entities. */
const htmlEscapes = { const htmlEscapes = {
'&': '&amp', '&': '&',
'<': '&lt', '<': '&lt;',
'>': '&gt', '>': '&gt;',
'"': '&quot', '"': '&quot;',
"'": '&#39' "'": '&#39;'
} }
/** Used to match HTML entities and HTML characters. */ /** Used to match HTML entities and HTML characters. */
@@ -36,7 +36,7 @@ const reHasUnescapedHtml = RegExp(reUnescapedHtml.source)
* @example * @example
* *
* escape('fred, barney, & pebbles') * escape('fred, barney, & pebbles')
* // => 'fred, barney, &amp pebbles' * // => 'fred, barney, &amp; pebbles'
*/ */
function escape(string) { function escape(string) {
return (string && reHasUnescapedHtml.test(string)) return (string && reHasUnescapedHtml.test(string))