feat(tui): proper markdown rendering with syntax highlighting#57
Merged
lostmygithubaccount merged 4 commits intomainfrom Mar 27, 2026
Merged
feat(tui): proper markdown rendering with syntax highlighting#57lostmygithubaccount merged 4 commits intomainfrom
lostmygithubaccount merged 4 commits intomainfrom
Conversation
Replace hand-rolled markdown parser with pulldown-cmark for full CommonMark + GFM support. Add syntect-based syntax highlighting for code blocks. New markdown features: - Headings with visual hierarchy (H1 bold+underlined, H2 bold, etc.) - Bullet and ordered lists with proper nesting and indentation - Blockquotes with styled │ bars - Tables with two-pass column alignment and per-cell styling - Links with URL dedup, strikethrough, task lists, horizontal rules - Inline code with dim backtick delimiters - Diff code blocks with red/green coloring - Syntax highlighting for 50+ languages (syntect, base16-eighties theme) Other fixes: - Ctrl+R hidden toggle for raw markdown source view - Clear widget before paragraph render to prevent ghost characters - Extract language token from code fence info strings with metadata - Consistent ordered list indentation across digit boundaries Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ownrendering # Conflicts: # crates/ascend-tools-tui/src/lib.rs
Fix table column widths to use unicode display width instead of byte length, fixing misalignment with CJK/emoji content. Fix ordered list digit padding when lists start at high numbers. Fix nested list indent restoration by saving/restoring parent indent instead of using a hardcoded formula. Add GFM blockquote admonition support ([!NOTE], [!TIP], [!IMPORTANT], [!WARNING], [!CAUTION]) with distinct colored labels. Replace implicit in_table() check with explicit field. Replace table span clone() with std::mem::take(). Add 8 new tests covering unicode tables, nested blockquotes, mixed lists, GFM admonitions, and edge cases. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix SoftBreak/HardBreak routing inside tables (was corrupting main span accumulator) - Trim syntect features to minimal set (drop html, plist, yaml, dump-create deps) - Remove trivial in_table() getter in favor of direct field access - Add explicit parens for operator precedence clarity in blank_line_if_needed - Add clarifying comments (Clear widget, find_syntax diff exclusion) - Add test for code block inside blockquote Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
Clearwidget before paragraph renderMarkdown elements now supported
│bars in DIM_COLOR, italic content, nesting supported[✓]/ dim[ ]markers────line in DIM_COLOR[image: url]placeholderBug fixes
Paragraphwidget doesn't clear unused cells; addedClearwidget pre-rendersql title="file.sql" lines="1-15"now extracts justsqlfor syntax detection and header displaylist_indentnow restored to parent item's continuation indent after nested listmax_digitsper list for consistent bullet paddingCodeevents inside table cells no longer leak to the main span accumulatorScreenshots/demo video
Coming soon
🤖 Generated with Claude Code