cmark

My personal build of CMark ✏️

Commit
9e5703b6f76b6d26e6b8f46ae3eca239d01bd380
Parent
af3c456b2495ef930719988fc1bc1848240122ef
Author
John MacFarlane <jgm@berkeley.edu>
Date

Minor code simplification.

Diffstat

1 file changed, 1 insertion, 2 deletions

Status File Name N° Changes Insertions Deletions
Modified js/lib/blocks.js 3 1 2
diff --git a/js/lib/blocks.js b/js/lib/blocks.js
@@ -143,11 +143,10 @@ var breakOutOfLists = function(block) {
 // Add a line to the block at the tip.  We assume the tip
 // can accept lines -- that check should be done before calling this.
 var addLine = function(ln, offset) {
-    var s = ln.slice(offset);
     if (!(this.tip._open)) {
         throw { msg: "Attempted to add line (" + ln + ") to closed container." };
     }
-    this.tip._strings.push(s);
+    this.tip._strings.push(ln.slice(offset));
 };
 
 // Add block of type tag as a child of the tip.  If the tip can't