Skip to content

Conversation

@keldenl
Copy link

@keldenl keldenl commented Jan 19, 2026

Summary

  • Normalize common code-fence aliases using Shiki’s bundled language metadata (js/cjs/mjs, ts/cts/mts, zsh, etc.) in @streamdown/code.
  • Add tests covering alias support.

Why

LLMs commonly emit "js" or "ts" fences by default. Mapping Shiki’s built-in aliases to bundled grammars keeps syntax highlighting working without prompt workarounds to force "javascript"/"typescript".

Testing

  • pnpm test
  • pnpm run check
  • pnpm run check-types

Issue links

No existing issues found for alias-based highlighting after broad search (code block, highlight, syntax highlight, alias, js).

@vercel
Copy link
Contributor

vercel bot commented Jan 19, 2026

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

A member of the Team first needs to authorize it.

@keldenl
Copy link
Author

keldenl commented Jan 19, 2026

Addressed the inline review note about casing: normalizeLanguage now lowercases unknown ids (while still mapping Shiki aliases). This keeps case handling consistent for Shiki lookups.

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