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 checkboxes uncheck themselves upon Synchronization #1832

Closed
deisner opened this issue Aug 26, 2019 · 5 comments

Comments

@deisner
Copy link

commented Aug 26, 2019

Environment

Joplin version: 1.0.165 (prod, win32)
Platform: Windows
OS specifcs: Windows 10 Enterprise

Steps To Reproduce

  1. Create a new note (Ctrl + N)

  2. Create a few checkbox items with Markdown (e.g. * [ ] Here is an item).
    image

  3. Check-off a checkbox:
    image

  4. Wait for Joplin to Syncrhonize.

Describe what you expected to happen:
I expect the checkbox to remain in the checked state after Joplin synchronizes, but what happens instead is it unchecks itself:
image

Logfile

webdev console:
image

Last 500 lines of log.txt:

log-tail-500.txt

@deisner deisner added the 🐛 bug label Aug 26, 2019

@tessus

This comment has been minimized.

Copy link
Collaborator

commented Aug 26, 2019

I'm sorry to say, but this is not a bug. At least not the one you think.

The markdown code for a check box item is - [ ] not * [ ]. If you change it to the correct format, it will work.

So the real bug is that * [ ] is even rendered as a checkbox. @laurent22 do we want to look into this or are we closing it as invalid?

@laurent22

This comment has been minimized.

Copy link
Owner

commented Aug 26, 2019

Yes let's leave it open. I'll change the plugin so that it doesn't render that markup as a checkbox to make it less confusing. Only supported syntax is with a dash.

@deisner

This comment has been minimized.

Copy link
Author

commented Aug 27, 2019

Thanks for the quick reply. I understand.

This context might help: I had nested list items that included links to external web pages, and I wanted to check-off which pages I'd read. So the * [ ] markdown came from a desire to add a check box to the beginning of some bulleted items -- the asterisk was part of a nested list.

I could have done something like this, instead, then:

image

However, I'm now thinking that this might also be a bug. Is the intended behavior to only permit a checkbox at the beginning of a line?

@tessus

This comment has been minimized.

Copy link
Collaborator

commented Aug 27, 2019

Nested checkboxes look like this:

- [ ] Checkbox 1
    - [ ] Checkbox 1.1
    - [ ] Checkbox 1.2
- [ ] Checkbox 2
@tessus

This comment has been minimized.

Copy link
Collaborator

commented Aug 27, 2019

checkboxes have to stand on their own. They can't be added or included in any other markdown. e.g. checkboxes in tables don't work.

@laurent22 laurent22 closed this in 5a9b3b6 Sep 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.