From ebbdd4fe0f4409fdbee5cc3f19f941addeceebcf Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Sat, 2 Sep 2017 22:22:29 +0530 Subject: [PATCH] FIX: error when rebaking posts --- .../pretty-text/engines/discourse-markdown/bbcode-block.js.es6 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/pretty-text/engines/discourse-markdown/bbcode-block.js.es6 b/app/assets/javascripts/pretty-text/engines/discourse-markdown/bbcode-block.js.es6 index c2706b7e664..8276d2318a8 100644 --- a/app/assets/javascripts/pretty-text/engines/discourse-markdown/bbcode-block.js.es6 +++ b/app/assets/javascripts/pretty-text/engines/discourse-markdown/bbcode-block.js.es6 @@ -176,8 +176,9 @@ function findInlineCloseTag(state, openTag, start, max) { closeTag = parseBBCodeTag(state.src, j, max); if (!closeTag || closeTag.tag !== openTag.tag || !closeTag.closing) { closeTag = null; + } else { + closeTag.start = j; } - closeTag.start = j; break; } }