extract_html_comment: Extract html comment

View source: R/html_comment.R

extract_html_commentR Documentation

Extract html comment

Description

Extract an html comment block from a file.

Usage

extract_html_comment(
  filename,
  dbegin_regex,
  dend_regex = dbegin_regex,
  remove_leading_blanks = TRUE,
  remove_trailing_blanks = TRUE
)

Arguments

filename

name of the html or Rmd file

dbegin_regex

delimiter at start of block (regular expression)

dend_regex

delimiter at end of block (regular expression)

remove_leading_blanks

whether to keep blank lines at the start of the content

remove_ending_blanks

whether to keep blank lines at the end of the content

Details

Will fail if either: there is more than one comment block matching either delimiter; or the ending delimiter occurs before the start delimiter.

Value

character vector with the lines between the delimiters


dalejbarr/assessr documentation built on Jan. 25, 2024, 10:47 p.m.