tmgrammar

Version:
sha256:6ae93ed
component
exportsansi-renderer,html-renderer,types

types interface

token:record {
content: string
scopes: list<string>
}
token-line:record {
tokens: list<token>
}
theme-color:record {
foreground: option<string>
background: option<string>
font-style: option<string>
}
theme-rule:record {
scope: string
}
html-theme:record {
name: string
foreground: string
background: string
rules: list<theme-rule>
}
html-render-options:record {
line-numbers: bool
pre-class: option<string>
code-class: option<string>
language: option<string>
}

html-renderer interface

Imported Types
mizchi:tmgrammar/types.{token-line}
mizchi:tmgrammar/types.{html-theme}
mizchi:tmgrammar/types.{html-render-options}
render-html(lines:list<token-line>, theme:html-theme, options:html-render-options)string
dark-plus-theme()html-theme
light-plus-theme()html-theme

ansi-renderer interface

Imported Types
mizchi:tmgrammar/types.{token-line}
render-ansi(lines:list<token-line>, line-numbers:bool)string
highlight-ansi(code:string, language:string)string