0f3739605c61ae57e44a6bc3a92e0f2fdc67656d
Custom marked renderer wraps fenced code blocks in a .code-block-wrapper div containing a language label badge (top-right) and a copy button. The language label shows the fenced language identifier in uppercase. A delegated click handler on the document root intercepts clicks on [data-copy-code] buttons, reads the sibling <code> element's text content, writes it to the clipboard, and shows a "Copied!" / "Failed" confirmation that auto-reverts after 1.5 seconds. Delegated handling is necessary because code blocks are rendered via dangerouslySetInnerHTML and don't participate in React's synthetic event system. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Description
No description provided
Languages
TypeScript
84.7%
HTML
8.8%
CSS
5%
JavaScript
1.5%