summaryrefslogtreecommitdiff
path: root/js/lib
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-12-10 20:48:02 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2014-12-10 20:48:31 -0800
commit5fbd73cc31627b125c59f98a5de41e6442235ea7 (patch)
treeb8d629cfdf5fe0bc8d55dee36f63faf239e092db /js/lib
parent1db8dd8d674229c102cd5839f56e5e50068fb4be (diff)
linter fixes to html5-entities.js and index.js.
Diffstat (limited to 'js/lib')
-rw-r--r--js/lib/html5-entities.js11
-rwxr-xr-xjs/lib/index.js2
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) {