summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-10-04 16:49:05 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-10-04 16:49:05 -0700
commit9d590fa7cd1158da138e602af542d2ca59d8d76e (patch)
tree17d399c7e3fea6f090ae54a603cdfb57a482a407 /js
parent52c69afc6f4ad2f962f55c6daa7adaab87f835ae (diff)
Some jshint fixes.
Diffstat (limited to 'js')
-rwxr-xr-xjs/stmd.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/js/stmd.js b/js/stmd.js
index 24651fb..9a3a8c7 100755
--- a/js/stmd.js
+++ b/js/stmd.js
@@ -2184,7 +2184,7 @@
PROCESSINGINSTRUCTION + "|" + DECLARATION + "|" + CDATA + ")";
var HTMLBLOCKOPEN = "<(?:" + BLOCKTAGNAME + "[\\s/>]" + "|" +
"/" + BLOCKTAGNAME + "[\\s>]" + "|" + "[?!])";
- var ENTITY = "&(?:#x[a-f0-9]{1,8}|#[0-9]{1,8}|[a-z][a-z0-9]{1,31});"
+ var ENTITY = "&(?:#x[a-f0-9]{1,8}|#[0-9]{1,8}|[a-z][a-z0-9]{1,31});";
var reHtmlTag = new RegExp('^' + HTMLTAG, 'i');
@@ -2239,12 +2239,12 @@
uchar = entities[m.slice(1,-1)];
}
return (uchar || m);
- }
+ };
// Replace entities and backslash escapes with literal characters.
var unescapeEntBS = function(s) {
return s.replace(reAllEscapedChar, '$1')
- .replace(reEntity, entityToChar);;
+ .replace(reEntity, entityToChar);
};
// Returns true if string contains only space characters.
@@ -2445,15 +2445,15 @@
var Emph = function(ils) {
return {t: 'Emph', c: ils};
- }
+ };
var Strong = function(ils) {
return {t: 'Strong', c: ils};
- }
+ };
var Str = function(s) {
return {t: 'Str', c: s};
- }
+ };
// Attempt to parse emphasis or strong emphasis.
var parseEmphasis = function(cc,inlines) {
@@ -2588,8 +2588,9 @@
this.parseBackticks([]);
break;
case C_LESSTHAN:
- this.parseAutolink([]) || this.parseHtmlTag([]) ||
+ if (!(this.parseAutolink([]) || this.parseHtmlTag([]))) {
this.pos++;
+ }
break;
case C_OPEN_BRACKET: // nested []
nest_level++;