Skip to content

fix: preserve literal data in multiline custom tags - #615

Draft
davidfant wants to merge 1 commit into
vercel:mainfrom
davidfant:fix/literal-data-containers
Draft

fix: preserve literal data in multiline custom tags#615
davidfant wants to merge 1 commit into
vercel:mainfrom
davidfant:fix/literal-data-containers

Conversation

@davidfant

Copy link
Copy Markdown

Problem

Multiline custom-tag preprocessing also processes literalTagContent tags. Its blank-line sandwich makes entity-encoded punctuation following a bare URL enter Markdown/GFM parsing. For example, a literal JSON body containing {"websites":["https://example.com"]} arrives with the closing ] still encoded and is no longer valid JSON.

Fix

Exclude explicitly literal tags from Markdown-container preprocessing. Keep existing literal escaping/restoration and normal Markdown custom-tag processing unchanged.

Validation

Added a renderer regression that fails on current main and passes with this change. 47 tests pass across custom-tag Markdown, preprocessing, and literal-content suites. Downstream reproduction: https://github.com/comp-work/monorepo/pull/1896 (private repository), where URL-bearing suggested tasks disappear while URL-free tasks survive. This source change corresponds to the downstream maintained patch; no sanitizer rules are relaxed.

@vercel

vercel Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

@davidfant is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

lofcz added a commit to lofcz/streamdown-ng that referenced this pull request Sep 7, 2026
Exclude literalTagContent from the blank-line sandwich so entity-encoded punctuation after a bare URL stays literal JSON. Ports vercel/streamdown#615 and matches dataOnlyTags with a case-insensitive skip set.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant