Skip to content

Commit

Permalink
Allow rendering strings
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldrapper committed Oct 31, 2023
1 parent 5a4002f commit 19408db
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/phlex/sgml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,10 @@ def render(renderable, &block)
else
yield_content(&renderable)
end
when String
plain(renderable)
else
raise ArgumentError, "You can't render a #{renderable}."
raise ArgumentError, "You can't render a #{renderable.inspect}."
end

nil
Expand Down

0 comments on commit 19408db

Please sign in to comment.