Make formatter a bit more convenient

This commit is contained in:
Roberto Alsina 2024-08-19 11:18:54 -03:00
parent 9042138053
commit 4a598a575b

View File

@ -34,7 +34,7 @@ module Tartrazine
@weight_of_bold : Int32 = 600)
end
def format(text : String, lexer : Lexer, io : IO) : Nil
def format(text : String, lexer : Lexer, io : IO?) : String?
outp = io.nil? ? String::Builder.new("") : io
pre, post = wrap_standalone
outp << pre if standalone?