fix: prevent title duplication in createNote#6
Merged
Conversation
- Remove 'name' property from AppleScript make new note command - Prepend title as <h1> in body HTML so Notes.app renders it as display title - HTML-encode title for safe embedding (&, <, >) - Handle backslashes (\) and tabs (<br>) in plaintext content encoding - Add 6 new tests: h1 title, special chars, plaintext encoding, HTML format, backslash, tab - Update docs: README, CHANGELOG, CLAUDE.md, TECHNICAL_NOTES.md Inspired by fredchu's PR #5 with additional backslash/tab handling and doc updates.
Contributor
|
Thanks for the quick turnaround on this! Really impressed by how fast you incorporated the fix and added the extra edge case handling (backslash/tab encoding) plus the doc updates. My contribution was just a small piece — the project itself is excellent. I use apple-notes-mcp daily as part of my AI assistant workflow and it's been rock solid. Appreciate you building and maintaining this! 🙏 |
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.
Summary
createNote()no longer sets thenameproperty — instead prepends<h1>title</h1>to the body HTML, letting Notes.app derive the display title from the first body element\) and tabs (<br>) now handled correctly in plaintext content, matching the existingescapeForAppleScript()behavior<h1>for both plaintext and HTML formatsInspired by @fredchu's PR #5 — incorporated their core fix with additional backslash/tab handling and comprehensive doc updates.
Test plan
npm run lint— cleannpm run typecheck— cleannpm test— 278 tests pass (272 existing + 6 new)