Align @types/vscode and engines.vscode at 1.125.0 so vsce packaging
stays valid. Bump wrangler to ^4.122.0 so @cloudflare/vite-plugin
1.52.0 can land after the npmmirror lag that blocked 1.51.2.
The star-history.com chart API is rate-limited. Adopt the same
approach as doocs/leetcode: generate images/starcharts.svg in the
repo via MaoLongLong/actions-starcharts on a 12h schedule, and
reference the local SVG in README.md and README-EN.md.
* fix(core): add boundary rules to markup extension delimiters
Intraword text like `C++是最好的语言,C++是最好的语言` had its two `++`
pairs matched as underline delimiters. Require the opening delimiter to
not directly follow an ASCII letter/digit (checked across inline token
boundaries), and disallow whitespace right inside the delimiters, so
`x==1==y`, `v1~2~3` and `++ text ++` stay literal as well. CJK intraword
usage such as `把++重点++标出` keeps rendering.
* fix(core): drop regex lookbehind from markup boundary rules
Regex lookbehind throws a SyntaxError at parse time in JS engines
without support (older WebViews), which would crash the whole renderer
on load. Enforce the same boundaries without it: scan delimiter runs in
`start` and check the preceding char manually, and require the content''s
final char via an explicit non-whitespace character class.
- Group posts by parent id once instead of re-filtering per tree node
- Collect headings during render instead of parsing the output HTML
- Debounce reactive persistence behind an in-memory overlay so sync
reads stay current; snapshot pending writes to localStorage on
pagehide and restore them on next launch so no state is lost
- Skip off-screen rendering via content-visibility for the post tree,
search results, and diff lines
- Preload the post-slider chunk when idle; pre-bundle diff-match-patch
so the dev server stops force-reloading on first interaction
unplugin-auto-import / unplugin-vue-components regenerate
auto-imports.d.ts and components.d.ts with LF on every dev-server
start. On Windows with core.autocrlf=true git expects CRLF, so the
files showed up as modified after each `pnpm web dev` despite an empty
diff. Pin eol=lf in .gitattributes to stop the phantom dirty state for
all contributors.
* fix(web): fix post search misses and history restore timestamp
- extract search logic to lib/search-posts with a 250ms debounce; count matches via String.match (avoids stale-lastIndex misses of a reused global RegExp across posts) in a single scan for results and totals together
- render search results and history version entries as real buttons; make the history list width responsive on narrow screens
- bump post.updateDatetime on history restore so restored content is picked up by update-time sorting and cloud sync
Co-authored-by: Cursor <cursoragent@cursor.com>
* perf(web): replace deep post watches with signature watchers
- watch per-post signatures (id/title/content length/updateDatetime ms/parent/history length/collapsed) instead of deep-traversing every post on each editor commit; the old deep watch compared identical object identities and never persisted edits
- collect dirty post ids in a set and flush once per debounce window, so rapid edits across different posts are all saved (shared single-argument debounce used to drop earlier posts)
- inject heading anchor ids during render instead of assigning output twice, avoiding a second preview DOM rebuild
Co-authored-by: Cursor <cursoragent@cursor.com>
* refactor: dedupe escapeHtml/delay helpers and remove dead code
- share one escapeHtml in apps/api share pages and reuse @md/core's in the formula dialog
- centralize the delay() helper used by preview boot, PNG export and the editor header
- drop unused createTable/checkImage utilities and a stale debug comment
Co-authored-by: Cursor <cursoragent@cursor.com>
* feat(web): improve keyboard accessibility across editor UI
- make drag-drop upload areas, syntax help cards, JSON preview expanders and the footer line/col indicator keyboard-operable (real buttons or role/tabindex + Enter/Space)
- reveal hover-only controls (post item menu, table cell delete buttons) on keyboard focus via focus-visible
- add missing aria-labels to icon-only buttons, role=tablist to the CSS editor tabs, role=checkbox to multi-select, and move the collapse toggle out of the post row button to avoid nested interactives
Co-authored-by: Cursor <cursoragent@cursor.com>
* test(core): add render tests for footnote, toc, ruby, markup, slider and alert extensions
Co-authored-by: Cursor <cursoragent@cursor.com>
* ci: unify web type-check with build and include @md/shared in tests
- run the package's own vue-tsc --build --force for type-check:web so CI catches the same errors as pnpm web build
- add @md/shared tests to the root test script
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(ci): commit generated auto-import/components dts for type-check job
vue-tsc --build --force builds the referenced tsconfig.app.json, which includes auto-imports.d.ts and components.d.ts. Both were gitignored, so the CI type-check job (no prior vite build to regenerate them) failed with TS2304 for every auto-imported global (ref, useDark, useToggle, ...).
The previous vue-tsc --noEmit ran on the solution-style root tsconfig (files: [] + references) and checked zero files, which is why CI was green while real errors slipped through.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(web): guard zero-width search matches and clean up a11y semantics
- ignore zero-width regex matches when counting, highlighting and snippeting so empty-matching patterns (a*, ^, \b) neither match every post nor inflate counts to O(content length); replace skips zero-width positions and inserts the replacement literally
- give the multi-select checkbox an accessible name (new common.selectPost message)
- move the CSS tab more-actions button out of the role=tab element so each tab is a single focus stop
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
The async onMounted callback can resolve after an HMR remount, where
codeMirrorWrapper of the stale instance is already null.
Co-authored-by: Cursor <cursoragent@cursor.com>
nextTick still runs inside Vue's update flush, where resize() ->
setLayout re-queues SplitterGroup's own update and Vue aborts with
'Maximum recursive updates exceeded'. rAF runs after paint when the
group layout has settled; the getSize guard prevents no-op resizes
from starting a constraint cascade.
Co-authored-by: Cursor <cursoragent@cursor.com>
- create and edit GFM tables in a dialog with row/column steppers,
per-column alignment cycling, and cell keyboard navigation
- open in edit mode from the editor context menu (position-aware via
posAtCoords), the insert dropdown, slash command, and command palette
- click a table in the preview to edit it, mapped positionally through
a marked-parity scanner (fence/blockquote/indentation aware)
- preserve original indentation on update, re-locate tables safely when
the document changed while the dialog is open, and swallow surplus
blank lines on delete
- guard ResizablePanel.resize() calls against reka-ui mount races
* build(deps): fix hono ReDoS via override and bump aws-sdk
- Override hono to ^4.13.0: @modelcontextprotocol/sdk pins 4.12.33,
which is vulnerable to ReDoS in the CORS middleware
(CVE-2026-69207 / GHSA-8j4g-w8fx-2239, dependabot alert #317)
- Bump @aws-sdk/client-s3 and @aws-sdk/s3-request-presigner to 3.1104.0
Co-authored-by: Cursor <cursoragent@cursor.com>
* ci: bump pnpm from 11.18.0 to 11.20.0 in workflows
All actions were verified against upstream and are already on their
latest major versions (checkout v7, setup-node v7, wrangler-action v4,
github-script v9, stale v11, upload-artifact v7, etc.).
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
- webpack: clean dist/ before builds so stale async chunks are not packaged
- webpack: keep previewRenderer as an external so it loads on demand
instead of being inlined into extension.js (3.97 MiB -> 9.7 KB)
- align @types/vscode with engines.vscode so vsce package succeeds
- relax smoke-test count assertion for locale-neutral core fallbacks
- Scope the manualChunks highlight.js rule to the package root so
@antv/infographic's select-highlight.js no longer drags roughjs,
measury fonts, culori and tinycolor2 onto the critical path
(highlight chunk: 281 kB -> 57 kB min)
- Only pin core @lezer packages (common/lr/highlight/markdown/html)
in the codemirror chunk; language grammars follow the lazy
LanguageDescription.load() chunks again (1,019 kB -> 624 kB min)
- Drop css/javascript language setups from the shared editor barrel;
lazy consumers import them via '@md/shared/editor/css' and
'@md/shared/editor/javascript' instead
- Replace jszip with fflate (already bundled via @md/core) for the
CSS-theme and posts ZIP exports; remove the jszip dependency
- Fix Vite native-config-loader warnings: replace __dirname with
fileURLToPath(import.meta.url) and add the .ts extension to the
local plugin import
WeChat's media/uploadimg endpoint returns a JSON body with a text/plain
Content-Type. The fetch wrapper that replaced axios only parsed
application/json responses, so the body stayed a string, res.url was
undefined, and the client reported "no URL returned" even though the
image had been uploaded successfully.
Restore axios-like lenient JSON parsing for non-JSON content types and
surface the WeChat errcode/errmsg detail in mp token/upload errors.
#1877
- Only set left/top/right/bottom style props when defined, avoiding
invalid `undefinedpx` CSS values when a side is omitted
- Disable the enter/leave transition under prefers-reduced-motion