From 6b995c1ed8a198f90c062d36b2d16e14a4e6ef4e Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Mon, 23 Oct 2023 14:46:48 +0200 Subject: [PATCH] added: todo.txt syntax --- main.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/main.js b/main.js index 998675c..beef3cd 100644 --- a/main.js +++ b/main.js @@ -2080,6 +2080,21 @@ function rawline2html(line, index, options) } } } + + // todo.txt + if (currentnote.title.includes("todo") || gettags(currentnote).includes("todo")) + { + if (line.startsWith("x ")) + { + line = "" + line + ""; + } + else + { + line = line.replace(/(\(\w\))/g, "$1"); + line = line.replace(/(@\w*)/g, "$1"); + line = line.replace(/(\+\w*)/g, "$1"); + } + } return line; }