feat: replace marked-terminal with custom terminal renderer - #696
Merged
Conversation
Replace marked-terminal with a custom TerminalRenderer extending marked.Renderer. Add proposal, design, specs, and tasks for the change. See issue #595 for full details.
Replace the unmaintained marked-terminal dependency with a custom TerminalRenderer class extending marked.Renderer. Upgrades marked from 9.1.6 to 15.x, enabling security fixes and new markdown features. The custom renderer implements all markdown elements with ANSI styling via chalk, syntax highlighting via cli-highlight, table rendering via cli-table3, emoji support via node-emoji, and hyperlink support via supports-hyperlinks. BREAKING: Renders output uses different ANSI sequences than marked-terminal. Visual output is parity-equivalent.
Archive the change and sync terminal-renderer spec delta to main.
avoidwork
enabled auto-merge (squash)
August 8, 2026 00:53
Replace control character escapes with dynamic regex construction,
fix const reassignments in reflowText, remove unnecessary regex
escapes, and replace new Array(n) with Array.from({ length: n }).
This was referenced Aug 8, 2026
Merged
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
Replace the unmaintained
marked-terminaldependency with a customTerminalRendererclass extendingmarked.Renderer. Upgradesmarkedfrom 9.1.6 to 15.x, enabling security fixes and new markdown features.Key Changes
markedTerminal()import with customTerminalRendererclass implementing all renderer methods (headings, paragraphs, bold, italic, code blocks, links, lists, tables, blockquotes, task checkboxes, strikethrough, images, HR)marked-terminal, upgradedmarkedto ^15.0.0, addednode-emojiandsupports-hyperlinksas direct dependenciesImplementation Details
chalkfor ANSI styling (already transitive dependency)cli-highlightfor code block syntax highlightingcli-table3for table renderingnode-emojifor:emoji-name:syntax supportsupports-hyperlinks+ansi-escapesfor terminal hyperlinksTesting
OpenSpec
Change:
replace-marked-terminal-custom-rendererSee openspec/changes/replace-marked-terminal-custom-renderer/ for full proposal, design, specs, and tasks.