From 660fc57c82b49f17eaf7d6b5108279ecae639982 Mon Sep 17 00:00:00 2001 From: Patrizio Bekerle Date: Tue, 4 Sep 2018 06:19:37 +0200 Subject: [PATCH] improved regular expression --- export-checkboxes/export-checkboxes.qml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/export-checkboxes/export-checkboxes.qml b/export-checkboxes/export-checkboxes.qml index 2cd9dfa..1ee8665 100644 --- a/export-checkboxes/export-checkboxes.qml +++ b/export-checkboxes/export-checkboxes.qml @@ -17,8 +17,7 @@ QtObject { function noteToMarkdownHtmlHook(note, html) { // see http://doc.qt.io/qt-5/richtext-html-subset.html for a list of // supported css styles - html = html.replace(/
  • (\s*)(

    )*(\s*)\[x\]/g, "

  • $1$2$3☑"); - html = html.replace(/
  • (\s*)(

    )*(\s*)\[X\]/g, "

  • $1$2$3☑"); + html = html.replace(/
  • (\s*)(

    )*(\s*)\[[xX]\]/g, "

  • $1$2$3☑"); html = html.replace(/
  • (\s*)(

    )*(\s*)\[ \]/g, "

  • $1$2$3☐"); return html; }