-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for newlines #214
Support for newlines #214
Conversation
Code Coverage Summary
Diff against main
Results for commit: e322670 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
# hack that is necessary only if bottom aligned | ||
topleft_has_nl_char <- FALSE | ||
if (has_topleft) { | ||
tl <- strmat[hdr_inds, 1, drop = TRUE] | ||
strmat[hdr_inds, 1] <- "" | ||
tl <- tl[nzchar(tl)] # we are not interested in initial "" but we cover initial \n | ||
topleft_has_nl_char <- any(grepl("\n", tl)) | ||
tl_to_add_back <- strsplit(paste0(tl, collapse = "\n"), split = "\n", fixed = TRUE)[[1]] | ||
how_many_nl <- length(tl_to_add_back) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would not be necessary if it is aligned top, and it is a bit of a hack
} | ||
newstrmat[1:new_nlines_hdr, 1] <- c(newtl, rep("", new_nlines_hdr - length(newtl))) | ||
newfrmmat[1:new_nlines_hdr, 1] <- "xx" | ||
newstrmat[starts_from_ind + seq_along(tl_to_add_back), 1] <- tl_to_add_back |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
similar as before, but I tried so many other ways, if we leave it bottom this is the only way that actually works
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! approve pr to allow downstream uat
Fixes #208