GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • cli
  • FAQ
  • Reference
  • Building a Semantic CLI
  • From usethis::ui functions to cli
  • cli pluralization
  • Introduction to progress bars in cli
  • Advanced cli progress bars
  • cli color palettes
  • More articles...
  • Changelog

This view

  • Original page
  • New address

GeezerVison is showing cli.r-lib.org — Format and returns a line of text — format_inline

Format and returns a line of text

Source: R/cli.R
format_inline.Rd

You can use this function to format a line of cli text, without emitting it to the screen. It uses cli_text() internally.

Usage

format_inline(
  ...,
  .envir = parent.frame(),
  collapse = TRUE,
  keep_whitespace = TRUE
)

Arguments

...

Passed to cli_text().

.envir

Environment to evaluate the expressions in.

collapse

Whether to collapse the result if it has multiple lines, e.g. because of \f characters.

keep_whitespace

Whether to keep all whitepace (spaces, newlines and form feeds) as is in the input.

Value

Character scalar, the formatted string.

Details

format_inline() performs no width-wrapping.

See also

This function supports inline markup.

Other functions supporting inline markup: cli_abort(), cli_alert(), cli_blockquote(), cli_bullets(), cli_bullets_raw(), cli_dl(), cli_h1(), cli_li(), cli_ol(), cli_process_start(), cli_progress_along(), cli_progress_bar(), cli_progress_message(), cli_progress_output(), cli_progress_step(), cli_rule, cli_status(), cli_status_update(), cli_text(), cli_ul(), format_error()

Examples

format_inline("A message for {.emph later}, thanks {.fn format_inline}.")
#> [1] "A message for \033[3mlater\033[23m, thanks `format_inline()`."
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.