Skip to content

Commit e7c8cbd

Browse files
committed
🐛 [Text] Test is summary rows exist before aligning it
1 parent 5db5ae8 commit e7c8cbd

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/backends/text/text_backend.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,13 @@ function _text__print_table(
226226
# We will create a vector to copy each column string that will be aligned. This
227227
# procedure is necessary because if the user wants to also apply the alignment to
228228
# the summary rows, we need to copy those lines before the alignment process.
229-
num_summary_rows = !isnothing(summary_rows) ? size(summary_rows, 1) : 0
229+
230+
if isnothing(summary_rows)
231+
# We should not apply the alignment regex to the summary rows if there is none.
232+
apply_alignment_regex_to_summary_rows = false
233+
end
234+
235+
num_summary_rows = apply_alignment_regex_to_summary_rows ? size(summary_rows, 1) : 0
230236

231237
column_str = Vector{String}(
232238
undef,

0 commit comments

Comments
 (0)