struct

Hwaro::Content::Processors::TableParser::Table

Inherits Struct / Value / Object

Represents a parsed table

Constructors

new(headers : Array(String), alignments : Array(Hwaro::Content::Processors::TableParser::Alignment), rows : Array(Array(String)))
Source

Instance methods

alignments
Source
alignments=(alignments : Array(Alignment))
Source
headers
Source
headers=(headers : Array(String))
Source
rows
Source
rows=(rows : Array(Array(String)))
Source
to_html(math : Bool = false, flags : InlineMarkdown::Flags | Nil = nil, hooks : RenderHooks::HookRenderContext | Nil = nil) : String

Convert table to HTML. math: true keeps $…$ spans in cells untransformed for the later math pass (see InlineMarkdown.render). With a hooks context whose table hook is configured, the stock markup (plus its thead/tbody sections) is handed to hooks.render_table instead of returned directly.

Source