Skip to content
Prev Previous commit
Next Next commit
fix(files): remove counter offset that prevented checkbox toggling
  • Loading branch information
waleedlatif1 committed Mar 28, 2026
commit 5721f70f82105492d160963d236fb24eae57d879
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,6 @@ const MarkdownPreview = memo(function MarkdownPreview({
[onCheckboxToggle]
)

const committedCheckboxCount = useMemo(
() => (committed ? (committed.match(/^[ \t]*(?:[-*+]|\d+[.)]) +\[[ xX]\]/gm) ?? []).length : 0),
[committed]
)

checkboxCounterRef.current = 0

const committedMarkdown = useMemo(
Expand All @@ -254,8 +249,6 @@ const MarkdownPreview = memo(function MarkdownPreview({
[committed, components]
Comment thread
waleedlatif1 marked this conversation as resolved.
)
Comment thread
waleedlatif1 marked this conversation as resolved.

checkboxCounterRef.current = committedCheckboxCount

return (
<div ref={scrollRef} className='h-full overflow-auto p-6'>
{committedMarkdown}
Expand Down
Loading