Skip to contents

Check if a character string includes an anchor tag

Usage

hasAnchor(tag)

Arguments

tag

Character string

Value

A logical

Examples

# Flags both anchors using id or name
hasAnchor('<a id="section-1"></a>')
#> [1] TRUE
hasAnchor('<a name="section-1"></a>')
#> [1] TRUE

hasAnchor("# section 1")
#> [1] FALSE