Skip to content

Commit 877b706

Browse files
committed
chore: update list intem function
1 parent 8d3648c commit 877b706

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/Common/Markdown/MarkDown.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,8 @@ const MarkDown = ({ setExpandableIcon, markdown, className, breaks, disableEscap
4545

4646
renderer.listitem = ({ text, task, checked }: Tokens.ListItem) => {
4747
if (task) {
48-
if (checked) {
49-
return `<li style="list-style: none">
50-
<input disabled type="checkbox" checked class="dc__vertical-align-middle" style="margin: 0 0.2em 0.25em -1.4em">
51-
${text}
52-
</li>`
53-
}
5448
return `<li style="list-style: none">
55-
<input disabled type="checkbox" class="dc__vertical-align-middle" style="margin: 0 0.2em 0.25em -1.4em">
49+
<input disabled type="checkbox" ${checked ? 'checked' : ''} class="dc__vertical-align-middle" style="margin: 0 0.2em 0.25em -1.4em">
5650
${text}
5751
</li>`
5852
}

0 commit comments

Comments
 (0)