Refactor field processing logic to simplify page breaks and enhance markdown formatting in CI report
This commit is contained in:
parent
14bd0fa47a
commit
640e239815
|
|
@ -1262,15 +1262,8 @@ tryCatch({
|
|||
}
|
||||
|
||||
# Iterate through fields using purrr::walk
|
||||
is_first_field <- TRUE
|
||||
purrr::walk(AllPivots_merged$field, function(field_name) {
|
||||
tryCatch({
|
||||
# Add page break before each field (except first)
|
||||
if (!is_first_field) {
|
||||
cat("\\newpage\n")
|
||||
}
|
||||
is_first_field <<- FALSE
|
||||
|
||||
message(paste("Processing field:", field_name))
|
||||
|
||||
# Load per-field rasters for all 4 weeks
|
||||
|
|
@ -1388,8 +1381,7 @@ tryCatch({
|
|||
sprintf("**Decline:** %s", field_kpi$Decline_Severity)
|
||||
)
|
||||
|
||||
cat(paste(kpi_parts, collapse = " | "), "\n")
|
||||
cat("\n") # Extra newline for paragraph separation without creating empty pages
|
||||
cat(paste(kpi_parts, collapse = " | "), "\n\n") # Double newline for markdown paragraph break
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue