Skip to content

Commit

Permalink
Merge pull request #1537 from rstudio/fmt-url-no-break
Browse files Browse the repository at this point in the history
Modify `fmt_url()` URLs such that line breaks don't occur
  • Loading branch information
rich-iannone authored Jan 17, 2024
2 parents 0a19437 + 021c8c9 commit bd0ecf2
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 87 deletions.
4 changes: 3 additions & 1 deletion R/format_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -9295,12 +9295,14 @@ fmt_url <- function(

x_str_non_missing <-
paste0(
"<span style=\"white-space: pre;\">",
"<a",
" href=\"", x_str_non_missing, "\"",
anchor_attr,
">",
label_str,
"</a>"
"</a>",
"</span>"
)

x_str[!is.na(x)] <- x_str_non_missing
Expand Down
Loading

1 comment on commit bd0ecf2

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.