Skip to content

Fix TypeDoc code span entity rendering#925

Merged
danielporterda merged 2 commits into
mainfrom
html-entity-generator-fix
Jul 1, 2026
Merged

Fix TypeDoc code span entity rendering#925
danielporterda merged 2 commits into
mainfrom
html-entity-generator-fix

Conversation

@danielporterda

Copy link
Copy Markdown
Contributor

Summary

Fixes the TypeDoc renderer so TypeScript syntax inside generated Markdown code spans is emitted as literal code instead of pre-escaped HTML entities.

This addresses the generated-output side of the problem seen in #895 / #875: Mintlify does not decode entities inside inline code spans, so generated forms like Promise<ConnectResult> render incorrectly. Prose/table summary text still goes through MDX-safe HTML escaping.

Changes

  • Split TypeDoc prose-cell escaping from code-span escaping.
  • Keep literal <, >, &, and => in generated TypeScript code spans while still escaping table pipes/backticks.
  • Regenerated the checked-in TypeScript reference pages for @daml/types, Wallet SDK, and dApp SDK.
  • Added a focused renderer test for TypeScript generics/arrows in code spans.

Validation

  • direnv exec . python3 -m pytest tests/test_typedoc.py tests/test_typescript_bindings_reference.py
  • direnv exec . npm run generate:typescript-bindings-reference
  • scan: no &lt;, &gt;, =&gt;, or &amp; inside inline code spans in generated TypeScript reference pages
  • direnv exec . python3 -m py_compile src/x2mdx/typedoc/render.py scripts/generate_typescript_bindings_reference.py
  • git diff --check

Local npx mint validate was attempted through direnv exec; it remained spinner-only for several minutes and was stopped. The PR CI should run the same Mintlify validation.

Signed-off-by: danielporterda <daniel.porter@digitalasset.com>
@danielporterda danielporterda marked this pull request as ready for review July 1, 2026 18:06
@mintlify

mintlify Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
cantonfoundation 🔴 Failed Jul 1, 2026, 6:28 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@danielporterda danielporterda merged commit 69d59a7 into main Jul 1, 2026
4 checks passed
@danielporterda danielporterda deleted the html-entity-generator-fix branch July 1, 2026 18:27
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.

2 participants