From fad734b50cfa98fc89edb2de5279dc8bdbc9f23c Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Thu, 25 Feb 2021 15:03:39 -0500 Subject: [PATCH] fix extra markup surrounding empty lines in textile toolbar --- assets/js/textiletoolbar.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/assets/js/textiletoolbar.js b/assets/js/textiletoolbar.js index 75e5b5c2..51edde85 100644 --- a/assets/js/textiletoolbar.js +++ b/assets/js/textiletoolbar.js @@ -90,12 +90,7 @@ function wrapSelection(textarea, options) { scrollTop = textarea.scrollTop, emptyText = text === ''; - let newText = text; - if (!emptyText && prefix[0] !== '[') { - newText = text.replace(/(\n{2,})/g, match => { - return suffix + match + prefix; - }); - } + const newText = text; if (type === 'inline' && newText.includes('\n')) { textarea.value = `${beforeSelection}[${prefix}${newText}${suffix}]${afterSelection}`;