diff options
-rw-r--r-- | js/lib/html5-entities.js | 11 | ||||
-rwxr-xr-x | js/lib/index.js | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/js/lib/html5-entities.js b/js/lib/html5-entities.js index b258b19..e0d703c 100644 --- a/js/lib/html5-entities.js +++ b/js/lib/html5-entities.js @@ -2125,9 +2125,10 @@ var entities = { Zscr: 55349, zscr: 55349, zwj: 8205, - zwnj: 8204 } + zwnj: 8204 }; var entityToChar = function(m) { + "use strict"; var isNumeric = /^&#/.test(m); var isHex = /^&#[Xx]/.test(m); var uchar; @@ -2135,15 +2136,15 @@ var entityToChar = function(m) { if (isNumeric) { var num; if (isHex) { - num = parseInt(m.slice(3,-1), 16); + num = parseInt(m.slice(3, -1), 16); } else { - num = parseInt(m.slice(2,-1), 10); + num = parseInt(m.slice(2, -1), 10); } uchar = fromCodePoint(num); } else { - ucode = entities[m.slice(1,-1)]; + ucode = entities[m.slice(1, -1)]; if (ucode) { - uchar = fromCodePoint(entities[m.slice(1,-1)]); + uchar = fromCodePoint(entities[m.slice(1, -1)]); } } return (uchar || m); diff --git a/js/lib/index.js b/js/lib/index.js index 4c5d390..4e04532 100755 --- a/js/lib/index.js +++ b/js/lib/index.js @@ -9,6 +9,8 @@ // var renderer = new commonmark.HtmlRenderer(); // console.log(renderer.render(parser.parse('Hello *world*'))); +"use strict"; + var util = require('util'); var renderAST = function(tree) { |