Repository navigation
Conversation
… backticks don't break out Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…out content Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…p typechecks against next-sanity Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
plsrd
had a problem deploying
to
agentic-localization
September 3, 2026 19:33 — with
GitHub Actions
Error
plsrd
had a problem deploying
to
agentic-localization
September 3, 2026 19:33 — with
GitHub Actions
Failure
…ds >=22.12 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
plsrd
had a problem deploying
to
agentic-localization
September 3, 2026 20:44 — with
GitHub Actions
Failure
plsrd
had a problem deploying
to
agentic-localization
September 3, 2026 20:44 — with
GitHub Actions
Error
This branch had an error being deployed
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.


What this PR does
Fixes two markdown-serialization bugs from the internal review of
agent-ready-content: code blocks that contain a triple-backtick run could break out of their fence, and callouts dropped the custom renderers when recursing into their content. It also aligns the starter's@sanity/clientcatalog on v8 so a fresh install typechecks again (main's CI was already red on this step).The third reported bug (Next app has no
Accept: text/markdownnegotiation) turned out not to be a bug — see below — so no code changed for it.Changes
1. Code fences sized to the content (
packages/agent-markdown/src/serializers.ts, newsrc/fence.ts)What was wrong: the
coderenderer wrappedcode.codein a literal three-backtick fence. Per CommonMark a fence closes at the first backtick run at least as long as the opener, so any code snippet that itself contained ``` (a markdown tutorial, a shell snippet quoting a fence) closed the block early and everything after rendered as prose.What changed: a small pure
fenceFor(code)picks a fence one backtick longer than the longest run inside the code (never shorter than three), and the renderer uses it for both the opener and closer. Plain code still gets the familiar```.2. Callouts forward the renderers on the recursive pass (
serializers.ts)What was wrong: the
calloutrenderer calledportableTextToMarkdown(value.content)with no options, so blocks nested inside a callout fell back to the library defaults:codelost thelanguage:filenameinfo string and the sized fence from (1), andimagerendered as a JSON dump of the block.What changed: the renderer map is hoisted to a
renderersconst and passed on the recursive call. The callout renderer is the only recursive renderer in the file. Note the starter's own callout schema currently only allowsblockchildren, so this is latent with the shipped schema; it matters as soon as someone widenscallout.contentwhen porting the pattern (which the bundled skill encourages).3. Next.js content negotiation: not a bug
The review said
apps/nexthas nomiddleware.tsand so can't honorAccept: text/markdownas itsllms.txtpromises. The Next app implements negotiation without middleware:apps/next/next.config.tshasbeforeFilesrewrites withhas: [{type: 'header', key: 'accept', value: '(.*)text/markdown(.*)'}]that send/docs/:sectionand/docs/:section/:articleto the/md/...route handlers, and the README documents this under "How the markdown routes work". Both apps also already skipVary: Accept(the README calls out the CDN caching caveat), so behavior matches between the two. No code changed.4.
@sanity/clientcatalog on v8 (pnpm-workspace.yaml,packages/agent-markdown/package.json)Not from the review, but it blocked verification. Per-starter lockfiles are gitignored, so a fresh install resolves
next-sanity@13.3.4(andsanity@6.12,@sanity/vision,@sanity/image-url) against@sanity/client@8.5, while the catalog pinned^7.24.createMarkdown(client)inapps/next/src/lib/markdown.tsthen fails typecheck with a private-member mismatch between the twoSanityClientclasses. The catalog now says^8.4.0and@agent-ready/markdownpeers on^8.0.0. Only@sanity/workflow-clistill pulls v7 transitively, which doesn't reach app code.Testing
Run from
agent-ready-content/afterpnpm install:SANITY_STUDIO_PROJECT_ID=placeholder SANITY_STUDIO_DATASET=production pnpm typecheck(typegen + all 5 workspaces): passes. Before commit 4 it failed inapps/nextwith theSanityClient$1mismatch, which is also what main's last CI run failed on.pnpm lint,pnpm format:check,pnpm validate: pass.pnpm --filter astro-app build: passes.pnpm --filter next-app build: compiles, then fails at the static export of/withDataset "production" not found for project ID "placeholder". Expected without a real project; not verified against a live dataset.fenceForreturns```for plain code and one-longer fences for embedded runs; a markdown code block containing```jsrenders inside a four-backtick fence; a callout with a nestedcodeandimagerenders the sized fence and the CDN image URL instead of a JSON dump.next devwithcurl -H "Accept: text/markdown"; the negotiation rewrites are unchanged from main.🤖 Generated with Claude Code