Added case-insensitivity for tasklists.

This commit is contained in:
Scharel Clemens 2018-11-30 01:06:35 +01:00
parent 4f98d47713
commit 717d0855e1
2 changed files with 8 additions and 1 deletions

View file

@ -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 {

View file

@ -16,7 +16,7 @@ Dialog {
return '<li><a href="tasklist:checkbox_' + occurence + '">☐ ' + p1 + '</a></li>'
} )
occurence = -1
convertedText = convertedText.replace(/^<li>\[x\]\s(.*)<\/li>$/gm,
convertedText = convertedText.replace(/^<li>\[[xX]\]\s(.*)<\/li>$/gm,
function(match, p1, offset) {
occurence++
return '<li><a href="tasklist:uncheckbox_' + occurence + '">☑ ' + p1 + '</a></li>'