diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-01-12 08:45:35 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-01-12 08:45:35 -0800 |
commit | 4bd3ce58851b0cd332b9d46d56e4e42795636984 (patch) | |
tree | 735a76901dec623d9577ccfa45785ff57b86a50a /js/lib/common.js | |
parent | f846824b17c83092fcb1e5dd92d3e931c39e76ef (diff) |
Moved "use strict" to top of modules.
Diffstat (limited to 'js/lib/common.js')
-rw-r--r-- | js/lib/common.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/js/lib/common.js b/js/lib/common.js index 8ba70a8..05640e3 100644 --- a/js/lib/common.js +++ b/js/lib/common.js @@ -1,3 +1,5 @@ +"use strict"; + var entityToChar = require('./html5-entities.js').entityToChar; var ENTITY = "&(?:#x[a-f0-9]{1,8}|#[0-9]{1,8}|[a-z][a-z0-9]{1,31});"; @@ -15,7 +17,6 @@ var reXmlSpecial = new RegExp(XMLSPECIAL, 'g'); var reXmlSpecialOrEntity = new RegExp(ENTITY + '|' + XMLSPECIAL, 'gi'); var unescapeChar = function(s) { - "use strict"; if (s[0] === '\\') { return s[1]; } else { @@ -25,7 +26,6 @@ var unescapeChar = function(s) { // Replace entities and backslash escapes with literal characters. var unescapeString = function(s) { - "use strict"; if (reBackslashOrAmp.test(s)) { return s.replace(reEntityOrEscapedChar, unescapeChar); } else { @@ -34,7 +34,6 @@ var unescapeString = function(s) { }; var normalizeURI = function(uri) { - "use strict"; return encodeURI(unescape(uri)); } |