hermes - ✅(Solved) Fix Bug: Markdown rendering strips asterisks in code blocks [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#20084Fetched 2026-05-06 06:38:50
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×3cross-referenced ×1

When displaying code in the TUI, Markdown rendering incorrectly strips asterisks from code blocks.

Root Cause

When displaying code in the TUI, Markdown rendering incorrectly strips asterisks from code blocks.

Fix Action

Fixed

PR fix notes

PR #20091: fix(tui): preserve pointer asterisks in markdown

Description (problem / solution / changelog)

Summary

  • Tighten single-asterisk emphasis parsing so delimiters adjacent to whitespace are left literal
  • Keep stripInlineMarkup aligned with the inline renderer
  • Add a regression render test for C pointer syntax like uint8_t* base = (uint8_t*)0x20000000;

Test Plan

  • npm test -- --run src/__tests__/markdown.test.ts
  • npm test
  • npm run type-check
  • npm run build
  • npx eslint src/__tests__/markdown.test.ts src/components/markdown.tsx

Closes #20084

Changed files

  • ui-tui/src/__tests__/markdown.test.ts (modified, +46/-1)
  • ui-tui/src/components/markdown.tsx (modified, +2/-2)
RAW_BUFFERClick to expand / collapse

Description

When displaying code in the TUI, Markdown rendering incorrectly strips asterisks from code blocks.

Example

Code should display: uint8_t* base = (uint8_t*)0x20000000;

But actually displays: uint8_t base = (uint8_t)0x20000000;

Impact

This makes C/C++ pointer syntax unreadable. Users cannot see:

  • Pointer declarations
  • Type casts
  • Dereference operators

Environment

  • OS: WSL (Ubuntu)
  • Terminal: Windows Terminal
  • Hermes version: latest

extent analysis

TL;DR

The issue can be addressed by adjusting the Markdown rendering configuration to preserve asterisks in code blocks.

Guidance

  • Verify that the Markdown renderer is correctly configured to handle code blocks with asterisks, which are used for pointer declarations and type casts in C/C++.
  • Check the documentation of the Markdown rendering library used in Hermes for any options or settings that can be adjusted to prevent stripping of asterisks.
  • Test the rendering of code blocks with escaped asterisks (e.g., \*) to see if this resolves the issue.
  • Consider reporting this as a bug to the Hermes developers if no configuration option is available.

Example

```c
uint8_t\* base = (uint8_t\*)0x20000000;

## Notes
The solution may depend on the specific Markdown rendering library used in Hermes and its configuration options.

## Recommendation
Apply workaround: Use escaped asterisks in code blocks until a fix is available, as this may provide a temporary solution to the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix Bug: Markdown rendering strips asterisks in code blocks [1 pull requests, 1 participants]