Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Markdown - Multi checkbox in one line

i have a issue with markdown in github comment.

- [ ] [ ] [ ] [ ] [ ] item 1
- [ ] - [ ] - [ ] - [ ]item 2

With above code, only the first checkbox is ok :(

like image 630
Huy it Avatar asked Jul 29 '15 08:07

Huy it


2 Answers

Although there is no option for inline checkboxes using standard [x],
you can use emoji for your purpose.

Here is the emoji code in markdown:

:black_square_button: empty checkbox   
:ballot_box_with_check: completed checkbox 1   
:white_check_mark: completed checkbox 2    
:heavy_check_mark: completed checkbox 3  

And the expected result:

enter image description here

Rendered as inline

enter image description here

like image 153
Akash Giri Avatar answered Sep 20 '22 15:09

Akash Giri


The documentation makes no mention of supporting multiple checkboxes on one line. I suspect it is not possible. However, if you want to have multiple checkboxes for one item, you can create a nested list. Like this:

- [ ] item 1
    - [ ] item 1-1
    - [ ] item 1-2
    - [ ] item 1-3
    - [ ] item 1-4
- [ ] item 2
    - [ ] item 2-1
    - [ ] item 2-2
    - [ ] item 2-3
    - [ ] item 2-4
like image 25
Waylan Avatar answered Sep 17 '22 15:09

Waylan