Add blank lines if needed.
ensure_blank_line(
text,
context = rs_get_context(),
above = FALSE,
below_first_row = FALSE,
below_selection = FALSE
)(character) Text to modify.
(class document_context)
Object with context of active RStudio document.
(logical) If TRUE, checks for the blank line above the
selection and if it is missing, adds blank line before the text.
(logical) If TRUE, checks for the blank line below
the first selected row and if it is missing, adds blank line after
the text.
(logical) If TRUE, checks for the blank line
below the last selected row and if it is missing, adds blank line after
the text.
String.