Skip to content

Commit

Permalink
Issue #813 bad horizontal row position with add_rows
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentarelbundock committed Nov 16, 2024
1 parent 09c752a commit a8d216e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Description: Create beautiful and customizable tables to summarize several
RTF, JPG, or PNG. Tables can easily be embedded in 'Rmarkdown' or 'knitr'
dynamic documents. Details can be found in Arel-Bundock (2022)
<doi:10.18637/jss.v103.i01>.
Version: 2.2.0.1
Version: 2.2.0.2
Authors@R: c(person("Vincent", "Arel-Bundock",
email = "[email protected]",
role = c("aut", "cre", "cph"),
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Bugs:

* Stars note in `kableExtra` escaped `\num{}` in LaTeX.
* Bad horizontal rule placement with `add_rows`. Thanks to @pyoungblood for Issue #813.

## 2.2.0

Expand Down
2 changes: 1 addition & 1 deletion R/modelsummary.R
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ modelsummary <- function(
if (!is.na(hrule) &&
!is.null(add_rows) &&
!is.null(attr(add_rows, "position"))) {
hrule <- hrule + sum(attr(add_rows, "position") < hrule)
hrule <- hrule + sum(length(attr(add_rows, "position") < hrule)) - 1
}
if (is.na(hrule)) {
hrule <- NULL
Expand Down

0 comments on commit a8d216e

Please sign in to comment.