question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Release 4.8 breaks task list styling

See original GitHub issue

Notice the missing “task-list-item” class on the <li> elements.

Markdown:

- [x] Task 1
- [ ] Task 2
- [ ] Task 3

Docsify 4.7.x Output:

<ul>
  <li class="task-list-item"><input type="checkbox" checked="">Task 1</li>
  <li class="task-list-item"><input type="checkbox">Task 2
  <li class="task-list-item"><input type="checkbox">Task 3
</ul>

Docsify 4.8.x Output:

<ul>
  <li><input checked="" disabled="" type="checkbox"> Task 1</li>
  <li><input disabled="" type="checkbox"> Task 2
  <li><input disabled="" type="checkbox"> Task 3
</ul>

Necessary code was deleted here (lines 299-310): https://github.com/docsifyjs/docsify/commit/a39b2147334d2ee81ed9da239c437706f56344f1#diff-d73f215ac772d2673dd8c51f24976e4eL299

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
timaschewcommented, Jan 22, 2019

We should add some test cases. I saw similar problems, for instance: https://github.com/docsifyjs/docsify/issues/717

0reactions
jhildenbiddlecommented, Jan 29, 2019

Thanks for the quick reply, @timaschew.

The inline <svg> suggestion was made to address issues with styling checkboxes in a way that will work with all supported browsers. The custom checkbox demo is interesting, but it doesn’t work in all browsers (most notably IE and Edge, but also older versions of Firefox). Technically the demo shouldn’t work in any browsers because pseudo-content should only work on container elements. From MDN web docs:

Note: The pseudo-elements generated by ::before and ::after are contained by the element’s formatting box, and thus don’t apply to replaced elements such as <img>, or to <br> elements.

An <input> element is a replaced element and not a container element, so pseudo content shouldn’t render. I’m guessing the -webkit-appearance declaration makes this possible and that Firefox decided to update their behavior to match (it only works in Firefox 63+). Given the issues in IE and Edge, styling the <input> directly is a non-option if we want the presentation to be consistent across all supported browsers. Inline <svg> elements are just one solution. Another is to accept that IE and Edge task lists will look different, knowing that these engines are either changing (Edge => Chrome engine) or will no longer warrant support in the future (IE10/11). I’ll investigate options and share my $0.02 on what seems to work best.

I agree that extending the markdown parser would be the right way to implement this. I haven’t noodled with the docsify source enough to know how to implement this and still maintain the end-user’s ability to extend the markdown parser as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Markdown header broken since v4.8.3 · Issue #717 - GitHub
If I block the version to v4.8.2, the Get Started is correctly rendered But using any version ... Release 4.8 breaks task list...
Read more >
Visual Studio 16.8 breaks .NET Framework 4.8 WPF build
We've used SDK style projects since a long time. And just now I managed to build the sample WPFApp project with an SDK...
Read more >
Announcing .NET Framework 4.8.1 - Microsoft Developer Blogs
We are excited to announce the release of the .NET Framework 4.8.1 today. It's included in the Visual Studio 2022 17.3 release and...
Read more >
Gradle 4.8 Release Notes
Potential breaking changes · Changed behaviour for missing init scripts · TaskContainer.remove() now actually removes the task · Signature.setFile() no longer ...
Read more >
OpenShift Container Platform 4.8 release notes
Use the when field to configure the executions of your task, and to list a series of references to when expressions. IBM Z...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found