Open heliostatic opened 3 years ago
Currently, tasks are appended to the daily note as #{var:task_tag} [[{var:tasks_file}#^{var:ref}|{var:task.stripnonalphanumeric}]]---
#{var:task_tag} [[{var:tasks_file}#^{var:ref}|{var:task.stripnonalphanumeric}]]---
However, it would be nice to add the task to a section, as is done in the Tasks file itself, and would presumably look something like:
find = re.compile(r'^(## ' + re.escape(heading) + r'\n.*?)\n+#', flags = re.MULTILINE|re.DOTALL) replace = '\\1\n- ' + entry + '\n\n#' if re.findall(find, original_content) == []: new_content = original_content + '## ' + heading + '\n- ' + entry + '\n\n#' else: new_content = re.sub(find, replace, original_content)
Currently, tasks are appended to the daily note as
#{var:task_tag} [[{var:tasks_file}#^{var:ref}|{var:task.stripnonalphanumeric}]]---
However, it would be nice to add the task to a section, as is done in the Tasks file itself, and would presumably look something like: