Skip to contents

This function checks if the input string contains a non-image hyperlink and formats it as an HTML anchor tag.

Usage

check_other_hyperlinks(x)

Arguments

x

A character string to check for non-image hyperlinks.

Value

A character string with the HTML anchor tag if a non-image hyperlink is found, otherwise the input string.

Examples

check_other_hyperlinks("https://example.com/page")
#> [1] "<a href =\"https://example.com/page\">https://example.com/page</a>"
check_other_hyperlinks("https://example.com/image.png")
#> [1] "https://example.com/image.png"
check_other_hyperlinks("https://example.com/image.jpg")
#> [1] "https://example.com/image.jpg"