Documentation
¶
Overview ¶
Package markdown provides a channel-agnostic pipeline for adapting LLM markdown output to chat platforms that don't render every GFM construct.
Today it focuses on tables: Discord and Telegram both ignore GFM table syntax, so raw `| col | col |` lines render as a wall of pipe characters. ConvertTables parses the input with goldmark (AST, not regex), locates table nodes, and rewrites them according to the configured TableMode.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertTables ¶
ConvertTables rewrites GFM tables in `input` according to `mode`. Non-table content is returned verbatim — line endings, code blocks, indentation, and trailing whitespace are preserved.
Types ¶
type TableMode ¶
type TableMode string
TableMode controls how GFM tables are rewritten before being sent to a chat platform.
const ( // TableModeCode wraps each table in a fenced “` block with column-aligned // monospace text so chat clients render it readably. TableModeCode TableMode = "code" // TableModeBullets converts each row into a bullet list of "Header: Value" pairs. TableModeBullets TableMode = "bullets" // TableModeOff disables conversion; the original text is returned unchanged. TableModeOff TableMode = "off" )