feat(discord): convert markdown tables to code blocks for proper rendering#4401
Open
airouz wants to merge 1 commit intoNousResearch:mainfrom
Open
feat(discord): convert markdown tables to code blocks for proper rendering#4401airouz wants to merge 1 commit intoNousResearch:mainfrom
airouz wants to merge 1 commit intoNousResearch:mainfrom
Conversation
…ering Discord does not support pipe-delimited markdown tables — they render as broken plain text. This adds a converter that detects table blocks (header + separator + rows), wraps them in fenced code blocks, and strips alignment markers so they display as clean ASCII tables. - Protects existing fenced code blocks from modification - Preserves non-table pipe lines, inline code, and Discord formatting - Includes 14 tests covering basic tables, alignment markers, multiple tables, code block isolation, and edge cases
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
Discord does not support pipe-delimited markdown tables. They render as broken plain text, losing all structure. This PR adds an automatic converter in that detects markdown table blocks and wraps them in fenced code blocks so they display as clean ASCII tables.
Changes
How it works
Before vs After
Before: Pipe tables render as flat broken text in Discord
After: Tables display as structured monospace ASCII tables
Test results
14/14 passed