cmark

My personal build of CMark ✏️

Commit
0efcb9ff947ee9fcda77f317f2bec811160dca4a
Parent
e6c06dbb715f59b5b9dd4ad7fb7090f83e3ad90d
Author
John MacFarlane <jgm@berkeley.edu>
Date

jshint improvements.

Diffstat

1 file changed, 7 insertions, 5 deletions

Status File Name N° Changes Insertions Deletions
Modified js/stmd.js 12 7 5
diff --git 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;