Repository navigation
md2 v0.2.6: Zhihu & WeChat paste fixes
md2 v0.2.6: 知乎 images verified in the real editor, 公众号 paste fixes, and exports that no longer hang in the background.
Install
- VS Code: search md2 in the Extensions view, or
code --install-extension brycewang-stanford.md2(Marketplace). - Cursor / VSCodium / Windsurf: Open VSX.
- Or download
md2-0.2.6.vsixbelow and run Extensions: Install from VSIX….
Fixed
- 公众号 images no longer fail to paste (有 N 个内容插入失败). The WeChat editor fetches every pasted image from Tencent's servers, and "Copy for WeChat" was pasting local / webview image URLs. With WeChat credentials saved (the ones "Publish draft" uses), copy now uploads each image to WeChat's own CDN (mmbiz.qpic.cn); SVG badges are converted to PNG first. Without credentials, or if the upload fails, images map to public URLs as for Zhihu (
image_base, pushed files → jsDelivr / wsrv.nl), with base64 and a warning as a last resort. md2 wechatmaps local images the same way and takes--image-base/--no-git.- 公众号 paste keeps its layout. Callouts (
> [!TIP]…) keep their box: WeChat drops<div>, so they are now<section>. Task-list items no longer split the ☑ and the text onto two lines. The paste no longer triggers 内容结构检测 warnings: the claude theme's bold highlighter (and aurora's h3 marker) use an inset shadow instead of a gradient text background, and footnote markers no longer setline-height: 0. - Long image / Xiaohongshu export no longer times out when the VS Code window is in the background or covered by another window. The rasteriser waited for an animation frame, which Chromium doesn't fire for a page that isn't painting.
- 知乎 images, tested in the real editor. Paste tests showed Zhihu rejects
raster.shields.iobadges, and that a cold jsDelivr cache can fail. Badges now go through the wsrv.nl proxy as PNG, and GitHub-hosted images (your pushed files andraw.githubusercontent.com) try wsrv.nl first, then jsDelivr. On this README, all 20 images re-host correctly. Pasted base64 images do not work in Zhihu (it maps them all to one cached image), so md2 now warns that unpushed images must be pushed or given animage_base. - Copying large articles works. On macOS, copying more than ~1 MB (e.g. with inline images) silently failed (
osascript failed); the CLI and VS Code copy now handle any size.