Skip to content

Commit

Permalink
fix: avoid vertical overlapping lines with grid output
Browse files Browse the repository at this point in the history
fix #644
  • Loading branch information
davidgohel committed Aug 4, 2024
1 parent ae1ee65 commit c085b4e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: flextable
Title: Functions for Tabular Reporting
Version: 0.9.7.003
Version: 0.9.7.004
Authors@R: c(
person("David", "Gohel", , "[email protected]", role = c("aut", "cre")),
person("ArData", role = "cph"),
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- fix caption issue that came with no version of bookdown (issue #645),
'bookdown' management of caption has been simplified.
- fix vertical overlapping lines with grid output (issue #644)

# flextable 0.9.6

Expand Down
4 changes: 4 additions & 0 deletions R/grid_funs.R
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ grid_data_add_cell_info <- function(grid_data, x) {
"border.color.right", "border.width.top", "border.width.bottom"
)
]
# apply a correction to overlapping vert. borders
setorderv(fortify_borders_data, cols = c(".part", ".row_id", ".col_id"))
fortify_borders_data[fortify_borders_data$border.width.right == shift(fortify_borders_data$border.width.left, type = "lead", fill = -1),
c("border.width.right") := 0, by = c(".part", ".row_id")]

cell_data <- cell_data[, .SD,
.SDcols =
Expand Down

0 comments on commit c085b4e

Please sign in to comment.