lib/repper/format/annotated.rb in repper-1.0.0 vs lib/repper/format/annotated.rb in repper-1.1.0

- old
+ new

@@ -1,8 +1,9 @@ module Repper module Format - Annotated = ->(elements, theme) do - table = Tabulo::Table.new(elements.reject(&:whitespace?), **TABULO_STYLE) + # A structured and colorized format with annotations about token types. + Annotated = ->(tokens, theme) do + table = Tabulo::Table.new(tokens.reject(&:whitespace?), **TABULO_STYLE) table.add_column( :indented_text, styler: ->(_, string, cell) { theme.colorize(string, cell.source.type) } ) table.add_column(