Skip to content

feat: convert markdown to HTML for proper Apple Notes rendering#5

Open
jbkjr wants to merge 1 commit intoSiddhant-K-code:mainfrom
jbkjr:feat/markdown-to-html
Open

feat: convert markdown to HTML for proper Apple Notes rendering#5
jbkjr wants to merge 1 commit intoSiddhant-K-code:mainfrom
jbkjr:feat/markdown-to-html

Conversation

@jbkjr
Copy link

@jbkjr jbkjr commented Jan 25, 2026

Summary

  • Add markdown to HTML conversion so Apple Notes renders formatting properly
  • Apple Notes body property accepts HTML, so headings, bold, lists etc. now display correctly
  • Simple regex-based converter with no additional dependencies

Supported Markdown

  • Headings (h1-h6)
  • Bold (**text** or __text__)
  • Italic (*text* or _text_)
  • Strikethrough (~~text~~)
  • Inline code
  • Links [text](url)
  • Unordered lists (- or *)
  • Ordered lists (1. 2. 3.)
  • Blockquotes (>)
  • Horizontal rules (---)

Test plan

  • Create note with markdown headings - verify they render as headings
  • Create note with bold and italic - verify formatting renders
  • Create note with bullet list - verify list renders without extra bullets
  • Create note with numbered list - verify ordered list renders

🤖 Generated with Claude Code

Apple Notes body property accepts HTML, so converting markdown input to HTML
allows headings, bold, italic, lists, and other formatting to render properly
instead of appearing as literal markdown syntax.

Changes:
- Add src/utils/markdown.ts with regex-based markdown to HTML converter
- Update formatContent() to convert markdown before escaping for AppleScript

Supported markdown:
- Headings (h1-h6)
- Bold (**text** or __text__)
- Italic (*text* or _text_)
- Strikethrough (~~text~~)
- Inline code (`code`)
- Links [text](url)
- Unordered lists (- or *)
- Ordered lists (1. 2. 3.)
- Blockquotes (>)
- Horizontal rules (---)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant