summaryrefslogtreecommitdiff
path: root/js/stmd.js
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-09-11 09:34:29 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-09-11 11:17:42 -0700
commit0efcb9ff947ee9fcda77f317f2bec811160dca4a (patch)
tree01321a0d7a797b5f89031643d8d562ef9ee6bdb9 /js/stmd.js
parente6c06dbb715f59b5b9dd4ad7fb7090f83e3ad90d (diff)
jshint improvements.
Diffstat (limited to 'js/stmd.js')
-rwxr-xr-xjs/stmd.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/js/stmd.js b/js/stmd.js
index 6cf65d4..f7a1e4c 100755
--- a/js/stmd.js
+++ b/js/stmd.js
@@ -265,7 +265,7 @@
var startpos = this.pos;
var c ;
var first_close = 0;
- var c = this.peek();
+ c = this.peek();
if (!(c === '*' || c === '_')) {
return null;
}
@@ -324,7 +324,7 @@
this.last_emphasis_closer = null;
return inlines[0];
}
- } else if (next_inline = this.parseInline()) {
+ } else if ((next_inline = this.parseInline())) {
inlines.push(next_inline);
} else {
break;
@@ -396,7 +396,9 @@
this.parseBackticks();
break;
case '<':
- this.parseAutolink() || this.parseHtmlTag() || this.parseString();
+ if (!(this.parseAutolink())) {
+ this.parseHtmlTag();
+ }
break;
case '[': // nested []
nest_level++;
@@ -515,7 +517,7 @@
// a special meaning in markdown, as a plain string, adding to inlines.
var parseString = function() {
var m;
- if (m = this.match(reMain)) {
+ if ((m = this.match(reMain))) {
return { t: 'Str', c: m };
} else {
return null;
@@ -676,7 +678,7 @@
this.last_emphasis_closer = null;
var inlines = [];
var next_inline;
- while (next_inline = this.parseInline()) {
+ while ((next_inline = this.parseInline())) {
inlines.push(next_inline);
}
return inlines;