Skip to content

Commit 6c97c3c

Browse files
committed
🐛 [Text] Trim lines before printing
1 parent ae970d4 commit 6c97c3c

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/backends/text/display.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function _text__flush_line(
6464
end
6565
end
6666

67-
println(display.buf, line)
67+
println(display.buf, rstrip(line))
6868
display.column = 0
6969
display.row += 1
7070

test/backends/text/cropping.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@
249249
┌────────┬────────┬────────┬────────┬────────┬────────
250250
│ Col. 1 │ Col. 2 │ Col. 3 │ Col. 4 │ Col. 5 │ Col. ⋯
251251
├────────┴────────┴────────┴────────┴────────┴────────
252-
│ Row Group 1
252+
│ Row Group 1
253253
├────────┬────────┬────────┬────────┬────────┬────────
254254
│ (1, 1) │ (1, 2) │ (1, 3) │ (1, 4) │ (1, 5) │ (1, 6 ⋯
255255
├────────┼────────┼────────┼────────┼────────┼────────
@@ -274,7 +274,7 @@
274274
├────────┼────────┼────────┼────────┼────────┼────────
275275
│ (1, 1) │ (1, 2) │ (1, 3) │ (1, 4) │ (1, 5) │ (1, 6 ⋯
276276
├────────┴────────┴────────┴────────┴────────┴────────
277-
│ Row Group 1
277+
│ Row Group 1
278278
├────────┬────────┬────────┬────────┬────────┬────────
279279
│ (2, 1) │ (2, 2) │ (2, 3) │ (2, 4) │ (2, 5) │ (2, 6 ⋯
280280
│ ⋮ │ ⋮ │ ⋮ │ ⋮ │ ⋮ │ ⋱
@@ -296,7 +296,7 @@ expected = """
296296
┌────────┬────────┬────────┬────────┬────────┬────────
297297
│ Col. 1 │ Col. 2 │ Col. 3 │ Col. 4 │ Col. 5 │ Col. ⋯
298298
├────────┴────────┴────────┴────────┴────────┴────────
299-
│ Row Group 1
299+
│ Row Group 1
300300
├────────┬────────┬────────┬────────┬────────┬────────
301301
│ (1, 1) │ (1, 2) │ (1, 3) │ (1, 4) │ (1, 5) │ (1, 6 ⋯
302302
│ ⋮ │ ⋮ │ ⋮ │ ⋮ │ ⋮ │ ⋱
@@ -565,7 +565,7 @@ expected = """
565565
┌────────┬────────┬────────┬────────┬────────┬────────
566566
│ Col. 1 │ Col. 2 │ Col. 3 │ Col. 4 │ Col. 5 │ Col. ⋯
567567
├────────┴────────┴────────┴────────┴────────┴────────
568-
│ Row Group 1
568+
│ Row Group 1
569569
├────────┬────────┬────────┬────────┬────────┬────────
570570
│ (1, 1) │ (1, 2) │ (1, 3) │ (1, 4) │ (1, 5) │ (1, 6 ⋯
571571
├────────┼────────┼────────┼────────┼────────┼────────
@@ -589,7 +589,7 @@ expected = """
589589
┌──────────┬──────────┬──────────┬──────────┬─────────
590590
│ Col. 1 │ Col. 2 │ Col. 3 │ Col. 4 │ Col. ⋯
591591
├──────────┴──────────┴──────────┴──────────┴─────────
592-
│ Row Group 1
592+
│ Row Group 1
593593
├──────────┬──────────┬──────────┬──────────┬─────────
594594
│ (1, 1) │ (1, 2) │ (1, 3) │ (1, 4) │ (1, ⋯
595595
├──────────┼──────────┼──────────┼──────────┼─────────
@@ -614,7 +614,7 @@ expected = """
614614
┌────────┬────────┬────────┬────────┬────────┬────────
615615
│ Col. 1 │ Col. 2 │ Col. 3 │ Col. 4 │ Col. 5 │ Col. ⋯
616616
├────────┴────────┴────────┴────────┴────────┴────────
617-
│ Row Group 1
617+
│ Row Group 1
618618
├────────┬────────┬────────┬────────┬────────┬────────
619619
│ (1, 1) │ (1, 2) │ (1, 3) │ (1, 4) │ (1, 5) │ (1, 6 ⋯
620620
├────────┼────────┼────────┼────────┼────────┼────────

0 commit comments

Comments
 (0)