md_softline: Markdown soft line breaks

View source: R/md-lines.R

md_softlineR Documentation

Markdown soft line breaks

Description

Take a character vector and return a glue vector of separated by a single newline. This inline is rendered as single ⁠<p>⁠ HTML tags.

Usage

md_softline(...)

Arguments

...

Any number of character vectors.

Details

A regular line break (not in a code span or HTML tag) that is not preceded by two or more spaces or a backslash is parsed as a softbreak. (A softbreak may be rendered in HTML either as a line ending or as a space. The result will be the same in browsers. In the examples here, a line ending will be used.)

Value

A glue vector with elements of ... separated by a single newline.

See Also

Other inline functions: md_autolink(), md_bold(), md_code(), md_convert(), md_disallow(), md_escape(), md_hardline(), md_image(), md_issue(), md_italic(), md_link(), md_strike(), md_text()

Examples

# compare the following
md_bold(c("One", "Two"))

md_softline(md_bold(c("One", "Two")))

gluedown documentation built on May 29, 2024, 11:42 a.m.