Hmm, Iām struggling getting that PR to work. Iāve pulled it in locally, kicked up the docker dev environment, but I canāt get the checkboxes to show with or without markdown-it enabled.
Iāve even completely destroyed the docker dev environment and re-initialized.
Edit:
Figured it out, this errant return; statement
https://github.com/cpradio/discourse-plugin-checklist/pull/9/commits/1ff70f501da887b1486a2d97f265e2d6a7dbf298#diff-58d619630012ba3d44eea8bdb4f2440bR114
However, there is already : with the current implementation, given the following, it breaks
[] Item One
[*] Item Two (should be checked)
[ ] Item Three
[*] Item Four (should also be checked)
Actual output:, Items Two through Four are italized.
Iāve got that fixed, however, now with markdown-it turned off, the fix for the italize is causing checking a checkbox to not show properly (preview pane shows it properly though when you edit the post afterwards).
It is only breaking with markdown-it disabled. But for the life of me, I havenāt a clue why, as when I trace it down, it is replacing [\*]
with the appropriate span
tag and classes, but when it saves the post, the [\*]
reappears from seemingly nowhereā¦
Granted, this can happen with [_]
as well on new markdown-it, but that value canāt be generated by clicking the checkbox, so the user should see the issue and escape it before it is submitted. Only [*]
is capable of being written based on the user clicking a box.
Updated PR to look at (which has your PR and the fixes I described above ā and the issue with markdown-it disabled)
https://github.com/cpradio/discourse-plugin-checklist/pull/9