You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Open
futuremotiondev opened this issue
Sep 16, 2024
· 3 comments
· May be fixed by #11060
## 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.
Switch to RTE mode.
Observe that both lists are rendered as checkbox lists:
Also if inspected with devtools, you can see that Joplin is treating them both as a single checkbox list:
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:
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
The text was updated successfully, but these errors were encountered:
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.
Fixeslaurent22#11059
Fix the markdown parser to correctly render normal UL and Checkbox UL separately.
* **Assets/TinyMCE/JoplinLists/src/main/ts/core/NormalizeLists.ts**
- Add `isCheckboxList` function to check if a list is a checkbox list.
- Modify `normalizeLists` to handle checkbox lists separately.
* **Assets/TinyMCE/JoplinLists/src/main/ts/listModel/JoplinListUtil.ts**
- Correct typo in `findContainerListTypeFromElement` function.
- Ensure `findContainerListTypeFromElement` correctly identifies checkbox lists.
* **Assets/TinyMCE/JoplinLists/src/main/ts/listModel/ParseLists.ts**
- Import `isCheckboxListItem` from `JoplinListUtil`.
- Update `parseLists` to handle checkbox lists separately and set the correct list type.
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
Also if inspected with devtools, you can see that Joplin is treating them both as a single checkbox list:
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
The text was updated successfully, but these errors were encountered: