md_hardline: Markdown hard line breaks

View source: R/md-lines.R

md_hardlineR Documentation

Markdown hard line breaks

Description

Take a character vector and return a collapsed glue vector with each original element separated by two spaces and a newline. This inline is rendered with a ⁠<br />⁠ HTML tag.

Usage

md_hardline(...)

Arguments

...

Any number of character vectors.

Details

A line break (not in a code span or HTML tag) that is preceded by two or more spaces and does not occur at the end of a block is parsed as a hard line break (rendered in HTML as a ⁠<br />⁠ tag)

Value

A glue vector with elements of ... separated by two trailing spaces and a single newline.

See Also

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

Examples

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

gluedown documentation built on Nov. 2, 2023, 5:48 p.m.