Skip to content

Commit 15fc681

Browse files
committed
Patch markdown parity gaps
1 parent cacbb5d commit 15fc681

6 files changed

Lines changed: 520 additions & 10 deletions

File tree

docs/cloudflare-workers-migration.md

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ TanStack.com is configured as a Cloudflare Workers deployment for this branch. N
1313
- `src/routes/api/builder/*`, `src/components/builder/*`: builder deploy/download path uses browser-generated files; direct server-generation endpoints return explicit 501 on Workers.
1414
- `src/routes/*`, `src/utils/*`, `src/server/*`: CDN cache headers moved from Netlify-specific headers to portable `CDN-Cache-Control` / `Cache-Tag`.
1515
- `src/utils/markdown/processor.ts`: site-side compatibility guard for escaped angle brackets in generated TypeDoc markdown until `@tanstack/markdown` handles `\<...\>` as escaped text.
16+
- `patches/@tanstack__markdown@0.0.4.patch`, `pnpm-workspace.yaml`, `pnpm-lock.yaml`: temporary `@tanstack/markdown` patch for compact table delimiters, footnotes, and legacy single-tilde strike headings until an upstream package release is available.
1617
- Removed hosting-only Netlify files: `netlify.toml`, `netlify/functions/*`, `scripts/run-built-server.mjs`.
1718

1819
## Commands Used
@@ -24,18 +25,21 @@ pnpm run build:cloudflare
2425
pnpm test
2526
pnpm run deploy:cloudflare
2627
pnpm run preview:cloudflare -- --host 127.0.0.1 --port 3001
28+
pnpm patch @tanstack/markdown@0.0.4
29+
pnpm patch-commit node_modules/.pnpm_patches/@tanstack/markdown@0.0.4
30+
pnpm install --force
2731
```
2832

29-
Additional checks used `curl`, Node fetch scripts, Wrangler tail, and Playwright with system Chrome against the Workers preview URL.
33+
Additional checks used `curl`, Node fetch scripts, Wrangler tail, and Playwright with system Chrome against the Workers preview URL. The local `/Users/tannerlinsley/GitHub/markdown` package source was also checked with `pnpm run typecheck`, `pnpm test`, and `pnpm run build` before refreshing the site patch.
3034

3135
## Worker
3236

3337
- Account: `8da95258a9c70b54c3e2b374a0079106`
3438
- Worker: `tanstack-com`
3539
- URL: `https://tanstack-com.thetanstack.workers.dev`
36-
- Current version: `5fc0f032-4b93-4f9a-8983-cd27803ac9d9`
37-
- Upload size: `14607.10 KiB` raw, `4735.79 KiB` gzip
38-
- Startup time: `35 ms`
40+
- Current version: `3e098f31-77b6-44bf-ba39-d5c4617977ae`
41+
- Upload size: `14609.48 KiB` raw, `4736.36 KiB` gzip
42+
- Startup time: `33 ms`
3943
- Note: the secret-bearing `tanstack-com-staging` Worker was renamed to `tanstack-com`, and the older empty `tanstack-com` Worker was removed.
4044

4145
## Passed
@@ -60,6 +64,12 @@ Additional checks used `curl`, Node fetch scripts, Wrangler tail, and Playwright
6064
- `Link` response headers for static assets are emitted on SSR responses for Cloudflare Early Hints fallback.
6165
- Broad docs/blog audit generated 2,767 latest-doc/blog URLs from GitHub doc trees plus local blog posts and compared production vs Worker.
6266
- Escaped generic headings in TypeDoc markdown now render correctly, e.g. `Interface: AudioAdapter<TModel, TProviderOptions>` with the production-compatible `interface-audioadaptertmodel-tprovideroptions` anchor.
67+
- Local site parser checks now match the remaining markdown audit diffs:
68+
- `/ai/latest/docs/code-mode/code-mode` parses 4 content tables.
69+
- `/db/latest/docs/collections/powersync-collection` parses 24 content tables.
70+
- `/start/latest/docs/framework/react/migrate-from-next-js` headings render as `Server Actions Functions` and `Server Routes Handlers`.
71+
- `/blog/tanstack-router-signal-graph` renders footnotes with `data-footnotes` and production-compatible footnote anchors.
72+
- Live Worker rechecks against production passed for the same table, heading, and footnote signals after deploying version `3e098f31-77b6-44bf-ba39-d5c4617977ae`.
6373
- Three full-body rechecks of 43 URLs that intermittently returned Worker 500/timeout during the high-concurrency audit cleared; the only stable non-200s were `/hotkeys/latest/docs/reference` and `/pacer/latest/docs/reference`, both 404 on production and Worker.
6474

6575
## Failed Or Not Proven
@@ -90,11 +100,17 @@ Cloudflare image transformations are disabled by default because `/cdn-cgi/image
90100

91101
The new markdown renderer initially parsed escaped TypeDoc generics like `\<T\>` as inline HTML. The site now protects escaped `<` / `>` outside code fences and inline code before parsing, restores them into text nodes before render, and rebuilds headings so rendered content and ToC anchors stay aligned.
92102

103+
Resolved markdown differences from the broad audit:
104+
105+
- Escaped TypeDoc generics no longer become inline HTML.
106+
- Compact markdown table delimiters like `:--:` now parse as tables, matching the existing production renderer.
107+
- Blog footnotes now render with `data-footnotes`, `user-content-fn-*`, and `user-content-fnref-*` anchors.
108+
- Legacy single-tilde strike headings now render without visible `~` markers.
109+
93110
Remaining markdown differences observed during audit:
94111

95112
- Production duplicates light/dark code blocks; the Worker branch renders one theme-aware code block. This explains large HTML-size and `<pre>` count differences.
96-
- Blog footnote headings are omitted by the new renderer on a few posts. Confirm whether this is an intentional markdown package behavior change before treating it as a site regression.
97-
- Two table-count diffs remain in `/ai/latest/docs/code-mode/code-mode` and `/db/latest/docs/collections/powersync-collection`; these should be reviewed upstream in `@tanstack/markdown` because route/status/content otherwise match.
113+
- The `@tanstack/markdown` fixes are currently carried as a pnpm patch in this branch. Replace it with the next published package version once upstream includes the same behavior.
98114

99115
## Readiness
100116

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"@tanstack/ai-openai": "^0.9.5",
6262
"@tanstack/create": "^0.68.3",
6363
"@tanstack/highlight": "^0.0.2",
64-
"@tanstack/markdown": "^0.0.4",
64+
"@tanstack/markdown": "0.0.4",
6565
"@tanstack/pacer": "^0.21.1",
6666
"@tanstack/react-hotkeys": "^0.10.0",
6767
"@tanstack/react-pacer": "^0.22.1",

0 commit comments

Comments
 (0)