Skip to content

Commit

Permalink
Allow for a specific case that there is no column alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
mclements committed Jan 29, 2025
1 parent a8d690c commit 377db5d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions R/table.R
Original file line number Diff line number Diff line change
Expand Up @@ -497,9 +497,10 @@ kable_org = function(...) {
res[i] = gsub('[|]:', '|-', res[i])
res[i] = gsub(':[|]', '-|', res[i])
# prepend the description of the column alignment
res = c(if (i>1) res[1:(i-1)] else NULL,
sprintf("|%s|", paste0(alignment,collapse="|")),
res[i:length(res)])
if (any(alignment != ""))
res = c(if (i>1) res[1:(i-1)] else NULL,
sprintf("|%s|", paste0(alignment,collapse="|")),
res[i:length(res)])
}
res
}
Expand Down

0 comments on commit 377db5d

Please sign in to comment.