laurent22 / joplin

Joplin - the privacy-focused note taking app with sync capabilities for Windows, macOS, Linux, Android and iOS.
https://joplinapp.org
Other
45.97k stars 4.99k forks source link

BUG: Checkbox UL (list) markdown parsing is broken. If a normal UL is below or above a Checkbox UL, BOTH are rendered erronously as a Checkbox UL. #11059

Closed futuremotiondev closed 2 weeks ago

futuremotiondev commented 1 month ago

Operating system

Windows

Joplin version

3.1.8 (prod, win32)

Desktop version info

Joplin 3.1.8 (prod, win32)

Client ID: 1bb78c52da5b4fe090823a3b13953af6 Sync Version: 3 Profile Version: 47 Keychain Supported: Yes

Revision: 55faab2

Backup: 1.4.2 Csv Import: 1.0.1 Favorites: 1.3.2 Headings 4 to 6: 1.0.1 Insert Date: 1.0.1 Paste Special: 1.1.2 Table Formatter Plugin: 1.2.1

Current behaviour

  1. Create the following markup:
## Lorem ipsum dolor sit amet

- Lorem ipsum dolor sit amet, consectetur adipiscing elit.
- Ut fringilla neque efficitur imperdiet luctus.
- Donec id magna ac nisi iaculis gravida sit amet non orci.
- Praesent semper massa vel elit dapibus mollis.
- Proin sit amet massa mollis, convallis ipsum et, vulputate metus.

- [ ] Lorem ipsum dolor sit amet, consectetur adipiscing elit.
- [ ] Ut fringilla neque efficitur imperdiet luctus.
- [ ] Donec id magna ac nisi iaculis gravida sit amet non orci.
- [ ] Praesent semper massa vel elit dapibus mollis.
- [ ] Proin sit amet massa mollis, convallis ipsum et, vulputate metus.
  1. Switch to RTE mode.
  2. Observe that both lists are rendered as checkbox lists:

Joplin_LqBiyZdAy9

Also if inspected with devtools, you can see that Joplin is treating them both as a single checkbox list:

Joplin_DZFnLuRDWf

Expected behaviour

I expected Joplin to render the normal UL section with discs, and the checkbox UL section with check-boxes.

I have attached a zipped jex file that demonstrates the bug:

Broken List Rendering.zip

This is a fairly big rendering and parsing error, hopefully you can reproduce and fix. If you need any help with reproducing the bug I am here and will do my best.

Logs

No response

futuremotiondev commented 1 month ago

Also, a followup. If you insert an HR between the lists like so:

## Lorem ipsum dolor sit amet

- [ ] Lorem ipsum dolor sit amet, consectetur adipiscing elit.
- [ ] Ut fringilla neque efficitur imperdiet luctus.
- [ ] Donec id magna ac nisi iaculis gravida sit amet non orci.
- [ ] Praesent semper massa vel elit dapibus mollis.
- [ ] Proin sit amet massa mollis, convallis ipsum et, vulputate metus.

---

- Lorem ipsum dolor sit amet, consectetur adipiscing elit.
- Ut fringilla neque efficitur imperdiet luctus.
- Donec id magna ac nisi iaculis gravida sit amet non orci.
- Praesent semper massa vel elit dapibus mollis.
- Proin sit amet massa mollis, convallis ipsum et, vulputate metus.

It renders correctly:

Joplin_azMZrcLs2Z

tomasz1986 commented 1 month ago

This is a known limitation of Joplin (see https://github.com/laurent22/joplin/issues/6423#issuecomment-1100917535).

futuremotiondev commented 1 month ago

Looks like nirzaf just submitted a PR fixing this... awesome! Hopefully it gets merged.

github-actions[bot] commented 3 weeks ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? If you require support or are requesting an enhancement or feature then please create a topic on the Joplin forum. This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

github-actions[bot] commented 2 weeks ago

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, feel free to create a new issue with up-to-date information.