Repository navigation
Conversation
The terminal renderer in docs.ts handled headings, bullets and backtick spans but not **bold**, so `hyperframes docs compositions` printed the literal markers. Bold spans now go through the colour helper like code spans, so a TTY shows bold text and a non-TTY shows the text without the markers. The line rendering is exported as renderMarkdownLines so the test can read it. Fixes heygen-com#7277
3 tasks done
Collaborator
|
Thanks for contributing. I selected #7281 for this issue because its regression renders the actual compositions topic and pins the original bold-around-code example. Closing this overlapping submission so the issue has one implementation to take through CI and merge: #7281. Your work remains available in this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
hyperframes docs <topic>renders**bold**spans instead of printing the literal**markers.Why
hyperframes docs compositionsprinted**data-composition-variables**and**array of declarations**as-is: the terminal markdown renderer inpackages/cli/src/commands/docs.tshandled headings, bullets and backtick spans, but not bold.Related work
Fixes #7277
How
formatInlineCodebecameformatInline: after the backtick replacement it replaces**text**withc.bold(text), the same colour helper the headings use, so a TTY gets bold text and a non-TTY (orNO_COLOR) gets the plain text with the markers removed, matching how the renderer already treats code spans. A lone**with nothing between the pairs on one line is left alone. The per-line rendering moved into an exportedrenderMarkdownLines(content)that returns the lines, andrenderMarkdownprints them, so the test can assert on the output without capturingconsole.log.Test plan
docs.test.ts(a bold span renders without**and keeps its text; bold inside a list item and next to inline code; a bare2 ** 3line is unchanged).npx vitest run src/commands/docs.test.tsinpackages/cli: 6 passed.oxlintandoxfmtclean on both files;node scripts/check-comment-citations.mjsandnode scripts/comment-ratchet.mjsreport nothing to flag;docs.tshas no new comment blocks.