wooorm / markdown-rs

CommonMark compliant markdown parser in Rust with ASTs and extensions
https://docs.rs/markdown/1.0.0-alpha.18/markdown/
MIT License
836 stars 41 forks source link

Add support for enabling GFM tasklist checkedness #77

Closed rotmoded closed 10 months ago

rotmoded commented 11 months ago

This allows you to to enable whether or not html checkbox inputs are checkable, i.e. do not have the disable="" attribute.

Apologies if the terminology is confusing, I felt it was necessary to make it immediately obvious that this doesn't enable/disable checkboxes but instead enables/disables their ability to be checked.

wooorm commented 11 months ago

And then? How would you use this? Uncontrolled inputs don't do anything in HTML?

rotmoded commented 11 months ago

On 6 August 2023 18:59:09 BST, Titus @.***> wrote:

And then? How would you use this? Uncontrolled inputs don't do anything in HTML?

my use case is i wanted a simple to-do list for a blog post that is a guide, so people could keep track of the steps they had done.

-- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments

wooorm commented 11 months ago

Wouldnt you want to safe that somewhere? A server or local storage?

rotmoded commented 11 months ago

no, i don't see a need to, it's just a cute thing for people to use that will help them follow the guide while they are on the page. -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments

wooorm commented 11 months ago

no, i don't see a need to, it's just a cute thing for people to use that will help them follow the guide while they are on the page.

I worry about this. A nice cute thing is fun and all, of course. But these inputs are not labelled, they are not in a form, I worry about how screenreaders for example handle them.

rotmoded commented 11 months ago

i checked and it looks fine for screenreaders, they just get read as 'checkbox', without a 'form start' apparently

wooorm commented 11 months ago

ok, not against trying this out! Looks like CI is failing? See these for help:

rotmoded commented 10 months ago

oops! apologies, it should be all good now. cargo test works fine, but i noticed that cargo clippy --examples --tests --benches errors out. would you like me to fix that or update the documentation? it's trivial so idk if you would want a separate pr

wooorm commented 10 months ago

If you’re interested in fixing it, in this PR, or even separately, then please be my guest: I appreciate it! Whatever works for you :)

rotmoded commented 10 months ago

I went ahead, it was literally just one line so LOL

wooorm commented 10 months ago

Thanks!

wooorm commented 10 months ago

Released! :)