If some ---, still don't accept, but if none at all, then no chance of confusion, so lightparser could accept it?
Could lightparser add dummy yaml header?
In Quarto projects, it is common not to have yaml header in child docs..
Here is my workaround for now.
split_to_tbl2 <- function(file) {
tryCatch(
lightparser::split_to_tbl(file),
error = function(e) {
tmp <- withr::local_tempfile(
lines = c(
"---",
"title: dummy",
"---",
readLines(file, warn = FALSE)
)
)
lightparser::split_to_tbl(tmp)
}
)
}
Also would be great to add warn = FALSE to call to readLines() to avoid warning on missing final lines.
If some
---, still don't accept, but if none at all, then no chance of confusion, so lightparser could accept it?Could lightparser add dummy yaml header?
In Quarto projects, it is common not to have yaml header in child docs..
Here is my workaround for now.
Also would be great to add
warn = FALSEto call toreadLines()to avoid warning on missing final lines.