fix: smart markdown body filter for gh issue/pr view#214
Merged
pszymkowiak merged 1 commit intortk-ai:masterfrom Feb 19, 2026
Merged
fix: smart markdown body filter for gh issue/pr view#214pszymkowiak merged 1 commit intortk-ai:masterfrom
pszymkowiak merged 1 commit intortk-ai:masterfrom
Conversation
Replace truncated body display (3 lines + 80 chars) with intelligent markdown filtering that preserves all meaningful content while removing noise (HTML comments, badges, image-only lines, horizontal rules, excessive blank lines). Code blocks are preserved untouched. Closes rtk-ai#188
b1adc18 to
c3e8d8e
Compare
Contributor
Author
Manual testing: before / after
|
Collaborator
|
Clean PR, well tested. Smart approach — filtering markdown noise instead of truncating is the right call. Code block preservation works well (tested the edge cases). lazy_static! for all regex, graceful handling of unclosed fences, applied to both view_pr and view_issue. 10 tests including One minor nit (not blocking): find(" Good to merge — thanks! |
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
filter_markdown_body()removes noise while preserving all meaningful contentFilters applied (outside code blocks):
<!-- ... -->(single + multiline)[](link)---,***,___)Preserved: text, headers, lists, links, tables, code blocks
Test plan
cargo fmt --all && cargo clippy --all-targets && cargo testpasses (406 tests, 0 failures)rtk gh issue view 188— full body, filteredrtk gh pr view <N>— full body, filteredCloses #188
🤖 Generated with Claude Code