Skip to content

newlines in code formatted text throws error #417

Description

@zkamvar

My package uses cli to pass the output of a modified call to the user, which often has arguments wrapping to the next line. Version 3.2.0 now throws an error on newlines within {.code } formatted text:

cli::cli_text("{.code a & b}")
#> `a & b`
cli::cli_text("{.code a &\nb}")
#> Error in vapply(X, FUN, FUN.VALUE = character(1), ..., USE.NAMES = USE.NAMES): values must be length 1,
#>  but FUN(X[[1]]) result is length 2

Created on 2022-02-14 by the reprex package (v2.0.1)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions