feat: render markdown in detail view descriptions#50
Open
kevglynn wants to merge 1 commit into
Open
Conversation
Beads descriptions frequently contain markdown (code blocks, links, bullet lists, tables) but were rendered as plain text. Now uses the 'marked' library to convert markdown to formatted HTML. - Adds 'marked' as a runtime dependency (bundled by esbuild) - Lazy-initializes the Marked instance to avoid ESM/CJS issues - Falls back to escaped plain text if marked fails to load - Adds .markdown-body CSS with VS Code theme-aware styles for headings, code blocks, lists, tables, blockquotes, and links Made-with: Cursor
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.
Summary
Renders issue descriptions as formatted markdown instead of plain text in the detail webview panel.
Before: Raw markdown syntax displayed as-is (code fences, bullet markers, headers with
#, etc.)After: Descriptions render with proper formatting — headings, code blocks, inline code, lists, tables, blockquotes, and links.
Implementation
package.jsonmarkedv17 as a runtime dependencysrc/extension.tsMarkedinstance with GFM + breaks;renderMarkdown()helper replacesescapeHtml()for descriptions;.markdown-bodyCSS using VS Code theme variablesKey design choices
markedfails to load or parse, falls back to escaped plain text — no breakage.--vscode-textCodeBlock-background,--vscode-textLink-foreground,--vscode-panel-border, etc.) for native look in any theme.Test Plan
tsc --noEmit)Closes #49
Made with Cursor