PlainTasks icon indicating copy to clipboard operation
PlainTasks copied to clipboard

Make todo list compatible with Markdown syntax

Open JimmyLv opened this issue 6 years ago • 6 comments

For now, these are some options to identify the open or done tasks, can we add - [ ] and - [x] as one option too, to make it compatible with Markdown syntax?

"open_tasks_bullet": "☐", // options: - | ❍ | ❑ | ■ | □ | ☐ | ▪ | ▫ | – | — | ≡ | → | › | [ ]
"done_tasks_bullet": "✔", // options: + | ✓ | ✔ | √ | [x]

JimmyLv avatar Dec 26 '17 05:12 JimmyLv

It was discussed previously: we cannot do this and keep compatibility with Taskpaper format at the same time, unless maybe some comes up with tricky regexp or something.

vovkkk avatar Jan 17 '18 10:01 vovkkk

Thanks @vovkkk, could you please give me hint for changing it and I need to make it compatible with Markdown even giving up the Taskpaper format. ❤️

JimmyLv avatar Apr 13 '18 06:04 JimmyLv

Well, generally speaking if you want to make your own fork for this, first and foremost thing to change is regexes for tasks definitions in syntax files (PlainTasks.sublime-syntax for ST3 and PlainTasks.tmLanguage for ST2); there are three of them (pending, completed, and cancelled). Every of those consists of two main parts separated by |, the second part starts with |^\s*(?:(-)(\s+ and this part (I mean the whole part from | until the end of regex) is what you want to remove in all three definitions; also you have to add bullets into the fist parts, sth like this ^\s*(- \[ \]|❍|❑|■|□|☐|▪|▫|–|—|≡|→|›|\[\s\]), similar for other two. Add desired bullets into the settings file. Also PlainTasks.py contains regexes in PlainTasksCompleteCommand and PlainTasksCancelCommand—add the bullets there too.

vovkkk avatar Apr 13 '18 14:04 vovkkk

Is it possible to add * [ ] firstly? as I know is that GitHub issues support the TODOs below:

* [ ] task1
* [ ] task2
* [x] task3

=>

  • [ ] task1
  • [ ] task2
  • [x] task3

JimmyLv avatar Jul 10 '18 14:07 JimmyLv

Sure. Could you send a pull request?

vovkkk avatar Jul 10 '18 14:07 vovkkk

@vovkkk Hey, I just added a simple PR for it. https://github.com/aziz/PlainTasks/pull/387

JimmyLv avatar Jul 10 '18 15:07 JimmyLv