From 4a598a575bf904ccef29daceaff712a5acf4e11f Mon Sep 17 00:00:00 2001 From: Roberto Alsina Date: Mon, 19 Aug 2024 11:18:54 -0300 Subject: [PATCH] Make formatter a bit more convenient --- src/formatters/html.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/formatters/html.cr b/src/formatters/html.cr index ec39e46..cb33d89 100644 --- a/src/formatters/html.cr +++ b/src/formatters/html.cr @@ -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?