ensure_blank_line: Add blank lines if needed.

View source: R/ensure_blank_line.R

ensure_blank_lineR Documentation

Add blank lines if needed.

Description

Add blank lines if needed.

Usage

ensure_blank_line(
  text,
  context = rs_get_context(),
  above = FALSE,
  below_first_row = FALSE,
  below_selection = FALSE
)

Arguments

text

(character) Text to modify.

context

(class document_context)
Object with context of active RStudio document.

above

(logical) If TRUE, checks for the blank line above the selection and if it is missing, adds blank line before the text.

below_first_row

(logical) If TRUE, checks for the blank line below the first selected row and if it is missing, adds blank line after the text.

below_selection

(logical) If TRUE, checks for the blank line below the last selected row and if it is missing, adds blank line after the text.

Value

String.


GegznaV/addin.tools documentation built on Aug. 24, 2023, 5:35 p.m.