Skip to content

[codex] Fix AI code block rendering fallback#983

Merged
binaricat merged 1 commit into
binaricat:mainfrom
DeepFal:codex/fix-ai-conf-code-block-rendering
May 18, 2026
Merged

[codex] Fix AI code block rendering fallback#983
binaricat merged 1 commit into
binaricat:mainfrom
DeepFal:codex/fix-ai-conf-code-block-rendering

Conversation

@DeepFal
Copy link
Copy Markdown
Contributor

@DeepFal DeepFal commented May 14, 2026

Summary

  • wrap the Streamdown code highlighter with language normalization and fallback handling
  • map generic config fences (conf, cfg, config) to ini
  • render unsupported/text fences as plain text tokens instead of blank code blocks

Why

AI assistant responses can include rsyslog-style config snippets such as *.* action(...). When the fence language is generic or unsupported, the highlighter can fail and Streamdown may render the code body incorrectly or blank.

Validation

  • node --test --import tsx components/ai/streamdownCodeHighlighter.test.ts
  • npm run lint
  • npm test
  • npm run build

@binaricat binaricat marked this pull request as ready for review May 18, 2026 05:05
@binaricat
Copy link
Copy Markdown
Owner

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@binaricat binaricat merged commit d20a18b into binaricat:main May 18, 2026
10 checks passed
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