module

Ark::Slack::BlockKit

Constants

SEPARATOR_RE = /^\s*\|[\s\-:|]+\|\s*$/

Class methods

build_response_blocks(segments : Array(TextSegment), sources : Array(String)) : Array(JSON::Any)

Builds Slack Block Kit JSON blocks from segments and sources.

Source
parse_markdown_table(text : String) : Array(Array(String))

Parses markdown table text into rows of cell strings.

Source
parse_segments(text : String) : Tuple(Array(TextSegment), Bool)

Splits text into alternating prose and table segments. Returns segments and whether any tables were found.

Source
render_as_code_block(text : String) : String

Renders a markdown table as a preformatted, column-aligned code block.

Source
render_with_code_block_tables(segments : Array(TextSegment)) : String

Renders segments with tables as preformatted code blocks (fallback for Block Kit).

Source
table_line?(line : String) : Bool
Source

Nested types