class Ansi2Html

Defined in:

ansi2html.cr

Constant Summary

ANSI_ESC_SEQ_REGEX = /\A\x1b\[((?:\d{1,3};?)+|)m/
CHARS_TO_REMOVE_REGEX = /\A\x08+/
MALFORMED_SEQ_REGEX = /\A\x1b\[?[\d;]{0,3}/
PALLETE = {} of Symbol => Hash(String, String)
REAL_TEXT_REGEX = /\A([^\x1b\x08]+)/m
STYLES = {} of String => String

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def convert(input : String | Array(String), pallete = :linux) #

[View source]
def each(&block : String -> ) #

[View source]
def push_style(style) #

[View source]
def push_tag(tag, style = nil) #

[View source]
def reset_styles #

[View source]
def tokenize(text, &block : Symbol, String | UInt8 | Tuple(UInt8, UInt8, UInt8) -> ) #

[View source]