Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Fix" GFM tasklist rendering #806

Closed
wants to merge 5 commits into from
Closed

Conversation

bobhy
Copy link

@bobhy bobhy commented Jan 9, 2024

Resolves the issues raised in #805.

Changes html rendering for GFM tasklists from:

<p>Old task list</p>
<ul>
<li><input disabled="" type="checkbox"/>do it</li>
<li><input disabled="" type="checkbox" checked=""/>done</li>
</ul>
<p>
New task list
</p>
<ul>
<li style="list-style-type: '\2610   ';">to do</li>
<li style="list-style-type: '\2612   ';">done</li>
</ul>

Which renders as:
image

Apparently the former rendering is specified in Commonmark specs, so we should raise the question, potentially get a blessing from them. What's that process?

I don't know when list-style-type: <string> was released in CSS. Current Firefox, Edge and Chrome browsers support it, someone will need to try Safari.

\2612 for the "checked" marker renders as a box with an X, not a checkmark. That's my personal preference, but it's just Unicode and there's a \2611 that has the checkmark.

This is a modestly breaking change (for code that depends on HTML output). Should there be an old_gfm_task_render feature?

@bobhy bobhy changed the title Gfm task "Fix" GFM tasklist rendering Jan 9, 2024
@notriddle
Copy link
Collaborator

This seems like another feature to put on the pile of #645

Your rendering makes more sense for non-interactive lists (like mdBook), but the <input>-based rendering is what GitHub uses (that way, you can actually click the checkbox). The parser doesn't know if you're an interactive app or not.

A more robust HTML generator than pulldown-cmark has can expose a configuration option to pick between these modes.

@bobhy
Copy link
Author

bobhy commented Jan 10, 2024 via email

@notriddle
Copy link
Collaborator

I'm not the maintainer and can't really set project direction for pulldown-cmark. It's up to @raphlinus and @Martin1887 when and how the next release will go out.

@Martin1887
Copy link
Collaborator

Hello, the 0.10 version will be released when the pending pull requests are merged, hopefully this month.

However, new contributors are welcome, and indeed I had planned creating a new issue asking for contributors after the 0.10 release. To join as contributor, it is recommended to have a meeting with @raphlinus, and it is required respecting the rule of not merging pull requests or commits to the master branch without approval from another person.

@notriddle, @ollpu and @mgeisler are good candidates, based on previous contributions, but everyone is welcome.

Thanks!

@ollpu
Copy link
Collaborator

ollpu commented Jan 18, 2024

Hey, thanks for the recognition. I'm open to dedicating some on-and-off time to maintaining the project.

@Martin1887
Copy link
Collaborator

Hi, the project has been moved to a new organization and I have invited @ollpu and @notriddle to join as contributors of the project.

I have just created a v0.11 milestone with the most important issues for the 0.11 release, but discussion is open to add other ones.

@mgeisler
Copy link
Collaborator

@notriddle, @ollpu and @mgeisler are good candidates, based on previous contributions, but everyone is welcome.

I would be happy to contribute where possible, but I have to admit that I find it hard to find time for my own crates these days... I'll of course keep trying to add a comment here and there when I find time 😄

@Martin1887
Copy link
Collaborator

This change is more adequate in an alternative renderer, as @notriddle said, and it is already added in the tracking issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants