Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,7 +64,7 @@ def tag!(sym, *args, &block) | |
_end_tag(sym) | ||
_newline | ||
end | ||
elsif text.nil? | ||
elsif text.nil? || text.empty? | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
rubys
|
||
_indent | ||
_start_tag(sym, attrs, true) | ||
_newline | ||
|
Until this change, it was fairly easy to produce HTML using builder. There are a number of tags (for example: script) for which an empty body is needed. Script is the canonical example. The following used to produce both an open and close tag, all on the same line: