Fix Apple notes heading conversion#6
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughEnhanced Apple Notes HTML to Markdown conversion by generalizing heading conversion to process both H1 and H2 styled patterns, adding hard-break removal post-processing, and introducing corresponding test fixtures and approval tests. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hey @craditsch, it looks good! Sorry for the delay, I'm on vacation for the next week. Will test it manually when I get back. And great job on the tests and code rabbit. You made me realize I should add contribution guidelines and CI, etc. 🙏🏽 |
shakedlokits
left a comment
There was a problem hiding this comment.
Looks great overall, also tested it locally manually (how pristine has manual work become) for integration.
Just left a few small questions🙏
| <div> | ||
| <h1>Sample Project Notes</h1> | ||
| </div> | ||
| <div><b><span style="font-size: 24px">Sample Project Notes</span></b></div> |
There was a problem hiding this comment.
Was this fetched from Apple Notes directly?
| } | ||
|
|
||
| # Helper: Remove standalone hard breaks from Apple Notes blank lines | ||
| _remove_hard_breaks() { |
There was a problem hiding this comment.
What does this effect and why?
I mean, like what would be different without it?
This pull request updates the Apple Notes HTML-to-Markdown conversion to better recognize and convert Apple Notes heading patterns into proper Markdown headings. It also introduces new tests and fixtures to cover these heading cases.
Apple Notes heading conversion improvements:
_convert_apple_headingsfunction inhtml_to_markdown.shnow detects and converts Apple Notes H1 (font-size: 24px) and H2 (font-size: 18px) styled headings to<h1>and<h2>HTML tags, respectively. H3 and bold text remain indistinguishable and are handled as bold.apple_notes_sample.html,apple_notes_headings.html) and approval files have been updated to use Apple Notes’ styled heading patterns, ensuring the conversion logic is tested against real-world samples. [1] [2] [3] [4]unit_html_to_markdown_spec.sh) now includes a dedicated test for Apple Notes heading styles, verifying correct conversion to Markdown headings.Summary by CodeRabbit
New Features
Tests