Skip to content

fix(cli): render **bold** in docs topics instead of printing the markers (#7277) - #7281

Open
xunguangzlj-cloud wants to merge 2 commits into
heygen-com:mainfrom
xunguangzlj-cloud:fix/docs-bold-markers-7277
Open

xunguangzlj-cloud wants to merge 2 commits into
heygen-com:mainfrom
xunguangzlj-cloud:fix/docs-bold-markers-7277

Conversation

@xunguangzlj-cloud

@xunguangzlj-cloud xunguangzlj-cloud commented Nov 6, 2026 •

Copy link
Copy Markdown

Closes #7277

What this changes

hyperframes docs compositions printed the literal bold markers around attribute names. Render bold and inline code as separate spans, including code inside bold text. Asterisks that are part of the code itself are preserved.

Test

  • The real compositions.md regression fails on the original base and passes with the fix. The new code-span case reproduces the review feedback on the previously reviewed head.
  • bun run --cwd packages/cli test src/commands/docs.test.ts passes all 5 tests, including the real topic and the literal-asterisk case.
  • Changed-file lint and formatting, the CLI typecheck, Fallow, and the comment checks pass on Windows.

Prepared and revised with AI assistance.

SanHsien added a commit to SanHsien/hyperframes that referenced this pull request Nov 6, 2026
Re-verified the nine merged PRs in heygen-com#7266-heygen-com#7288 against fork file:line and
reverse-apply checks; none needs a new port. The six open PRs (heygen-com#7266, heygen-com#7269,
heygen-com#7281, heygen-com#7282, heygen-com#7285, heygen-com#7286) are pinned as monitored with revisit conditions;
monitored 99 -> 105.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
SanHsien added a commit to SanHsien/hyperframes that referenced this pull request Nov 6, 2026
…, record duplicate rule

Review PR heygen-com#7304-heygen-com#7335: 10 merged already adopted or deferred; 10 open or draft PRs
pinned (heygen-com#7304, heygen-com#7308, heygen-com#7311, heygen-com#7315, heygen-com#7321, heygen-com#7330-heygen-com#7334); open duplicates of
pinned heygen-com#7281/heygen-com#7285/heygen-com#7286/heygen-com#7296 are tracked by those pins. strict exit 0;
monitored 110 -> 120.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>

@jrusso1020 jrusso1020 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at aaf4a0217d8b4f523903fc0e1338f636135ed353.

The renderer now handles the reported bold-around-inline-code form, and the regression renders the actual compositions topic (packages/cli/src/commands/docs.test.ts:68). It reuses the existing color helpers, including their non-TTY behavior. Of the three submissions, this most directly pins the original report; #7327 has equivalent formatting, while #7328 still leaves the original nested markers.

Nit: packages/cli/src/commands/docs.ts:72-77 processes bold after removing backticks, so literal ** inside a code span can also be consumed (for example, the code span **not prose**). Preserve code-span contents while retaining the test for bold around code. This formatting edge does not block the reported topic fix.

Validation at this head: bun run --cwd packages/cli test src/commands/docs.test.ts → 4 passed. Built dependencies were reused from the preceding CLI build. Fresh independent source review found no Important defect; no live browser or native Windows run. No prior substantive reviews or inline comments were present.

Need: yes, requested starter issue · Size: ok · Reuse: existing CLI policy, color and checker helpers · Simpler: already minimal · Structure: fine
Risk: low — bounded CLI output/checker change

— hf-review

Verdict: APPROVE
Reasoning: The requested behavior is covered by focused tests and reuses the existing contract. No Important blocker found.

@jrusso1020 jrusso1020 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at a49c2baa2e9033a4312cda223f5d395f4320f895.

The prior literal-asterisk nit is resolved: packages/cli/src/commands/docs.ts:72 now selects code spans before interpreting bold, and the bold alternative treats nested code as opaque. The original compositions-topic regression remains covered, and the new case preserves literal ** both alone and inside bold (packages/cli/src/commands/docs.test.ts:68). No new blocker found.

Validation: independently extracted the actual formatInline and renderMarkdown source, transpiled with Bun and executed in a VM. 21 assertions passed across identity/non-TTY and ANSI color adapters: the actual compositions topic, original bold-around-code, literal asterisks in nested code, adjacent spans and unmatched markers. This probes formatter behavior; it does not load the full CLI module, actual picocolors, or run the repository Vitest suite. Full current command and test files read; delta is limited to the formatter and its regression.

Need: yes, starter issue and review feedback · Size: ok · Reuse: existing color helpers · Simpler: bounded single-pass token choice · Structure: fine
Risk: low — isolated CLI documentation formatting

— hf-review

Verdict: APPROVE
Reasoning: The reported topic formatting remains correct, and the follow-up preserves code contents without a new dependency or broader renderer changes.

@jrusso1020

Copy link
Copy Markdown
Collaborator

Thanks, @xunguangzlj-cloud. This is approved, and the only thing holding it back is commit signing: main requires signed commits. The 2 commits on this branch aren't verified.

To re-sign and push:

git rebase origin/main --exec "git commit --amend --no-edit -S"
git push --force-with-lease

GitHub's setup guide: https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits

If the content is unchanged, we'll queue it at your new head.

— Rames

This branch has not been deployed

No deployments
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.

hyperframes docs prints literal ** bold markers

2 participants