Skip to content

Commit 1f626be

Browse files
authored
Check for extra newline in delegated formatter output in HTMLTable (#2185)
1 parent 7a0a2e8 commit 1f626be

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/rouge/formatters/html_table.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def stream(tokens, &b)
2626
formatted = @inner.format(tokens)
2727
unless last_val && last_val.end_with?(?\n)
2828
num_lines += 1
29-
formatted << ?\n
29+
formatted << ?\n unless formatted.end_with?(?\n)
3030
end
3131

3232
# generate a string of newline-separated line numbers for the gutter>

0 commit comments

Comments
 (0)