clean_text_whitespace: Clean whitespace between text elements

View source: R/map_rd2markdown.R

clean_text_whitespaceR Documentation

Clean whitespace between text elements

Description

Within a series of text segments, the first text should have no leading whitespace, and all but the last element should end with at most one space character.

Usage

clean_text_whitespace(x)

Arguments

x

list of Rd tags

Examples

## Not run: 
x <- list(" a ", "`b`", " c ", block(), " d   \n", "e   \n", "f")
clean_text_whitespace(x)
# list("a ", "`b`", " c ", block(), "d ", "e ", "f")

x <- list(block(), " a ", "`b`", " c ", block(), " d ", "e ", "f", block())
clean_text_whitespace(x)
# list(block(), "a ", "`b`", " c ", block(), "d ", "e ", "f", block())

## End(Not run)


Genentech/rd2markdown documentation built on Feb. 28, 2025, 1:27 p.m.