tui.style_spec
tui.md.style_spec CLASS SPEC
Restyles one Markdown style class from SPEC, given as FG[/BG][:MOD,MOD...].
Parameters
CLASS: one ofh1toh6,strong,em,code,codeblock,quote,bullet,link,hr,marker,strike,hl_keyword,hl_string,hl_comment,hl_number,hl_var,page,table(the outline of tables) ortable_head(the header row).pageis the document background: every rendered row is padded to the width under it. It is empty by default.SPEC:FGoptionally followed by/BG, then optionally:and comma-separated modifiers.FGandBGaredefault(BGonly), a name fromTUI_MD_COLORS(black red green yellow blue magenta cyan white gray bright_red bright_green bright_yellow bright_blue bright_magenta bright_cyan bright_white) or#rrggbb. Modifiers are fromTUI_MD_MODS(bold dim italic underline reverse strike). An emptySPECrestores the default style ofCLASS.
Returns: 1 and changes nothing for an unknown class, color or modifier.
Notes
- The spec is remembered, so
tui.md.style_spec_ofreports it back. tui.md.style_resetundoes the change.- A spec set here goes on top of the base look chosen with
tui.md.profile.
Example
tui.md.style_spec h1 "cyan:bold,underline"
tui.md.style_spec code "#ff8000"
tui.md.style_spec page "white/#102030:bold"
