From 717d0855e16f2752159d7f0c7b4c7af71b47a387 Mon Sep 17 00:00:00 2001 From: Scharel Clemens Date: Fri, 30 Nov 2018 01:06:35 +0100 Subject: [PATCH] Added case-insensitivity for tasklists. --- qml/pages/EditPage.qml | 7 +++++++ qml/pages/NotePage.qml | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/qml/pages/EditPage.qml b/qml/pages/EditPage.qml index 06a9d86..ed57c34 100644 --- a/qml/pages/EditPage.qml +++ b/qml/pages/EditPage.qml @@ -45,6 +45,13 @@ Dialog { width: parent.width focus: true text: account.model.get(noteIndex).content + onTextChanged: { + // TODO Autocomplete list symbols + /*var preText = text.substring(0, cursorPosition) + preText = preText.substring(preText.lastIndexOf('\n')) + console.log(preText) + console.log(text.substring(cursorPosition))*/ + } } Row { diff --git a/qml/pages/NotePage.qml b/qml/pages/NotePage.qml index 341b5bc..44701a8 100644 --- a/qml/pages/NotePage.qml +++ b/qml/pages/NotePage.qml @@ -16,7 +16,7 @@ Dialog { return '
  • ☐ ' + p1 + '
  • ' } ) occurence = -1 - convertedText = convertedText.replace(/^
  • \[x\]\s(.*)<\/li>$/gm, + convertedText = convertedText.replace(/^
  • \[[xX]\]\s(.*)<\/li>$/gm, function(match, p1, offset) { occurence++ return '
  • ☑ ' + p1 + '
  • '