From 13bb719a890818e15ea14959fb5fdcab55cf54bc Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 23 Jan 2020 11:22:22 +0000 Subject: [PATCH] Add comment for operations loop --- src/editor/operations.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/editor/operations.js b/src/editor/operations.js index d0115d9ca7..d677d7016c 100644 --- a/src/editor/operations.js +++ b/src/editor/operations.js @@ -111,7 +111,7 @@ export function toggleInlineFormat(range, prefix, suffix = prefix) { // compute paragraph [start, end] indexes const paragraphIndexes = []; let startIndex = 0; - // let seenNewlines = 0; + // start at i=2 because we look at i and up to two parts behind to detect paragraph breaks at their end for (let i = 2; i < parts.length; i++) { // paragraph breaks can be denoted in a multitude of ways, // - 2 newline parts in sequence