Fix: tolerate CRLF line endings in action-item toggle/count#21
Merged
Conversation
A value stored with CRLF (e.g. pasted text) left a trailing \r on each line
after split('\n'); the end-anchored CHECKBOX_LINE then rejected it, so every
checkbox-with-text line failed to toggle ('Line is not an action item').
Split on any line ending and rejoin as LF (self-heals stored data on toggle),
and normalize CRLF->LF on write in updateActionItems.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Final piece of the action-items checkbox fixes. The line-mapping fix already landed in
mainvia #20; this carries the remaining CRLF fix (it was only on #19, which #20 did not include).Problem
toggleActionItemsplitsaction_items_mdon\nand matches the end-anchoredCHECKBOX_LINE. A value stored with CRLF (\r\n) leaves a trailing\ron each line, so- [ ] task\rfails the regex →{"ok":false,"error":"Line is not an action item"}for every checkbox-with-text line.Fix
action-items.ts— split on any line ending (\r\n|\r|\n) and rejoin as LF intoggleCheckboxAt; same forcountActionItems. Toggling self-heals stored CRLF data to LF.meetings.ts— normalize CRLF→LF on write inupdateActionItems, so CRLF can't be stored going forward.Test Plan
npm test— 164/164 (incl. 3 new CRLF cases)npx tsc --noEmit— cleannpm run build— compilesSupersedes the CRLF portion of #19 (closing #19, whose line-mapping commit is now redundant with #20).
🤖 Generated with Claude Code