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

Markdown To-Do List Not Formatting Correctly #1482

Open
1 of 2 tasks
jq-11 opened this issue Dec 4, 2024 · 2 comments
Open
1 of 2 tasks

Markdown To-Do List Not Formatting Correctly #1482

jq-11 opened this issue Dec 4, 2024 · 2 comments

Comments

@jq-11
Copy link

jq-11 commented Dec 4, 2024

Hello!

Here is a super small but weird bug.

Markdown creates to-do lists as follows:

- [ ] unchecked to-do 
- [x] checked to-do 

and the output looks like this:

  • unchecked to-do
  • checked to-do

Weirdly enough, in a bookdown .Rmd, the output looks slightly different:

- [ ] unchecked to-do 
- [x] checked to-do 

ends up looking like this

Image.

Here is my output for xfun::session_info('bookdown'):

R version 4.4.1 (2024-06-14)
Platform: aarch64-apple-darwin20
Running under: macOS Sonoma 14.7.1, RStudio 2024.9.0.375

Locale: en_US.UTF-8 / en_US.UTF-8 / en_US.UTF-8 / C / en_US.UTF-8 / en_US.UTF-8

Package version:
  base64enc_0.1.3   bookdown_0.41.1   bslib_0.8.0       cachem_1.1.0      cli_3.6.3         digest_0.6.37     evaluate_1.0.1   
  fastmap_1.2.0     fontawesome_0.5.3 fs_1.6.5          glue_1.8.0        graphics_4.4.1    grDevices_4.4.1   highr_0.11       
  htmltools_0.5.8.1 jquerylib_0.1.4   jsonlite_1.8.9    knitr_1.49        lifecycle_1.0.4   memoise_2.0.1     methods_4.4.1    
  mime_0.12         R6_2.5.1          rappdirs_0.3.3    rlang_1.1.4       rmarkdown_2.29    sass_0.4.9        stats_4.4.1      
  tinytex_0.54      tools_4.4.1       utils_4.4.1       xfun_0.49         yaml_2.3.10

Similar packages like bookdown (Jupyter Book and Carpentries' templates) had/have similar issues with rendering to-do lists.

I previously raised this issue to carpentries' formatting package GitHub, and they were able to solve the issue: carpentries/varnish#156.

Thanks for reading! Please help if you can!

Have a great day!

@cderv
Copy link
Collaborator

cderv commented Dec 23, 2024

Weirdly enough, in a bookdown .Rmd, the output looks slightly different:

Thanks for the report. This is CSS improvment. Can you get more precise on which bookdown format his is happening ?

Thank you !

I previously raised this issue to carpentries' formatting package GitHub, and they were able to solve the issue: carpentries/varnish#156.

This is the improvement they've done on their side.

.task-list {
  list-style-type: none !important;
}
.task-list input[type="checkbox"] {
  margin-right: 10px !important;
}

@jq-11
Copy link
Author

jq-11 commented Dec 24, 2024

Hi @cderv ! Thanks for the response!

I'm working in the Gitbook bookdown format, but I think this also occurs in the bs4_book as well (although I haven't tested this).

Thanks!

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

No branches or pull requests

2 participants