Skip to content

Commit

Permalink
align_margin() only considers non-compound null-units
Browse files Browse the repository at this point in the history
  • Loading branch information
teunbrand committed Jan 17, 2024
1 parent f651f45 commit cb1f50e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/align_plots.R
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ align_margin <- function(sizes, margin_to_align, greedy = TRUE) {
sizes,
function(x) {
# find all positions of unit NULL
null_idx <- grep("null", x)
null_idx <- grep("null$", x)
# if there are none, abort
if (length(null_idx) < 1) {
return(NULL)
Expand All @@ -70,7 +70,7 @@ align_margin <- function(sizes, margin_to_align, greedy = TRUE) {
sizes,
function(x) {
# find all positions of unit NULL
null_idx <- grep("null", x)
null_idx <- grep("null$", x)
# if there are none, abort
if (length(null_idx) < 1) {
return(NULL)
Expand Down

0 comments on commit cb1f50e

Please sign in to comment.