Skip to content

fix(cli): preserve cron asterisks in strip mode (#28019)#28353

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-3ad7d98a
May 19, 2026
Merged

fix(cli): preserve cron asterisks in strip mode (#28019)#28353
teknium1 merged 1 commit into
mainfrom
hermes/hermes-3ad7d98a

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Salvage of #28019 by @felix-windsor.

What: _strip_markdown_syntax() treated any line of 3+ asterisks as a Markdown horizontal rule and stripped it. Cron expressions like * * * * * (5 asterisks separated by spaces) matched the HR pattern and were silently removed from agent output. The single-emphasis stripper *text* also chewed up bare asterisks.

How:

  • Split the HR regex: - and _ still strip on 3+, but * only strips on exactly 3 (the canonical CommonMark form * * *).
  • Tighten the *emphasis* regex to require non-whitespace at both inner edges, so * * * * * no longer matches as five emphasis groups.
  • Test added covering both: cron expression preserved AND * * * HR still stripped.

Original PR: #28019
Fixes #28010.

@teknium1 teknium1 merged commit 5d1f350 into main May 19, 2026
@teknium1 teknium1 deleted the hermes/hermes-3ad7d98a branch May 19, 2026 03:08
@github-actions

Copy link
Copy Markdown
Contributor

🔎 Lint report: hermes/hermes-3ad7d98a vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 8791 on HEAD, 8791 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 4626 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

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.

[Bug]: *Asterisk characters () being stripped or replaced in terminal output*

2 participants