feat: add --rich flag to convert clipboard Markdown to rich text (HTML) - #8
Merged
Merged
Conversation
Copied Markdown pastes as raw syntax into rich editors because the clipboard only carries a plain-text flavor. The new --rich/-r mode renders clipboard Markdown to a clean semantic HTML fragment and writes it back to the macOS pasteboard with both HTML and plain-text flavors, so pasting into Confluence, Google Docs, Gmail, or Slack produces formatted content while plain-text targets still get the original markdown. - New richtext module: markdown-it-py (CommonMark + GFM tables and strikethrough) plus a BeautifulSoup scrub that unwraps spans, strips style/class attributes, and maps code fence languages to Confluence's recognized set (js -> javascript, yml -> yaml, ...) - New clipboard.copy_rich_text_to_clipboard: AppleScript record with hex-encoded «class HTML» data (inverse of the existing HTML read path), script passed over stdin to avoid argv size limits - CLI: --rich branches before audio auto-detection; composes with --preview, secret scanning, and an optional filename to also save the HTML Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XHkRru9CypU7LFbyT9vdVX
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.
Copied Markdown pastes as raw syntax into rich editors because the
clipboard only carries a plain-text flavor. The new --rich/-r mode
renders clipboard Markdown to a clean semantic HTML fragment and writes
it back to the macOS pasteboard with both HTML and plain-text flavors,
so pasting into Confluence, Google Docs, Gmail, or Slack produces
formatted content while plain-text targets still get the original
markdown.
strikethrough) plus a BeautifulSoup scrub that unwraps spans, strips
style/class attributes, and maps code fence languages to Confluence's
recognized set (js -> javascript, yml -> yaml, ...)
hex-encoded «class HTML» data (inverse of the existing HTML read
path), script passed over stdin to avoid argv size limits
--preview, secret scanning, and an optional filename to also save
the HTML
Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01XHkRru9CypU7LFbyT9vdVX