From 2fd22c6db6c156c3e709c600cd4fdb734576f4f1 Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 22 Dec 2017 14:56:01 +0100 Subject: [PATCH] Fix task list in markdown when using one empty line between tasks --- www/common/diffMarked.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/common/diffMarked.js b/www/common/diffMarked.js index 252ffe2c5..f79d8cbdc 100644 --- a/www/common/diffMarked.js +++ b/www/common/diffMarked.js @@ -23,8 +23,8 @@ define([ var mediaMap = {}; // Tasks list - var checkedTaskItemPtn = /^\s*\[x\]\s*/; - var uncheckedTaskItemPtn = /^\s*\[ \]\s*/; + var checkedTaskItemPtn = /^\s*(

)?\[[xX]\](<\/p>)?\s*/; + var uncheckedTaskItemPtn = /^\s*(

)?\[ ?\](<\/p>)?\s*/; renderer.listitem = function (text) { var isCheckedTaskItem = checkedTaskItemPtn.test(text); var isUncheckedTaskItem = uncheckedTaskItemPtn.test(text);