~kota/gemgen#6: 
markdown tasklists

Github flavored markdown supports "tasklists" which is a list of checkboxes. It's pretty commonly used in markdown so I might add support for it. I think it would just render as a regular list in gemini, but maybe there's a better idea?

Status
REPORTED
Submitter
~kota
Assigned to
No-one
Submitted
2 years ago
Updated
a month ago
Labels
No labels applied.

~hedy 2 years ago*

IMO, any of this should be good enough:

* [ ] a
* [x] b

Where the [ ] and [x] is a part of the list

or

​```
- [ ] a
- [x] b
​```

where the whole list is a pre block.

Maybe it could even have the [ ] and [x] as configurable emojis such as 🔲 and ☑️ respectively.

~kota 2 years ago

The list idea looks good and is pretty similar to markdown. I imagine people would do something like that in handwritten gemtext. Also I hadn't thought of using emojis, but thats a great idea! The pre blocks feel a bit unnecessary to me, but it could also be an option if people want that.

~kota 2 years ago

Had some time to look at this some more this morning. It turns out the current version of goldmark-gemtext (and thus gemgen) will render markdown task lists back exactly as written. Meaning if you write the following markdown:

- [ ] foo
- [x] bar

it becomes this gemtext:

* [ ] foo
* [x] bar

Only the list markers are changed. Everything after it is rendered as it was written. There is one weird quirk, if the markdown source isn't consistent about lowercase/capital x the output also will be inconsistent:

- [X] foo
- [x] bar

stays mixed case

* [X] foo
* [x] bar

I still think it would be nicer to have (at least optionally) the emoji checkboxes. I wrote support for it in goldmark-gemtext, but I still need to update the tests and figure out a good cli flag for gemgen (including being able to use non-default emojis such as ☑ for example). I'm leaning towards keeping the ascii checkboxes as the default output. It seems more in line with how people write gemtext in the wild.

~kota 2 years ago

All was going well, but for some reason the new renderTaskCheckBox method isn't getting the correct config applied. Going to require more investigating to see why the config isn't applying. Possibly a bug in goldmark. I've also thought about it a bit more and I think 🔲 and ☑️ should be the defaults for gemgen in order to promote accessibility. Those symbols will have a more more sensical pronunciation by screenreaders than something like [x].

Register here or Log in to comment, or comment via email.