extract_alt_text: Extract contents of text found in a '(ref:variable-alt)'...

View source: R/utils-extract-alt-text-knitr.R

extract_alt_textR Documentation

Extract contents of text found in a (ref:variable-alt) found in any rmd file

Description

Extract contents of text found in a (ref:variable-alt) found in any rmd file

Usage

extract_alt_text(inp_str)

Arguments

inp_str

The string to match, in the format (ref:alt-text-label)

Details

  1. Starts by parsing the ⁠_bookdown.yml⁠ file to extract the names of all uncommented rmd files in the current build.

  2. Searches all those files for any lines starting with (ref:variable-alt). Preceding spaces are ignored.

  3. Extracts all the text found for the label given by inp_str, and returns the description found for it (the actual alternative text)

Value

The text found for the label given by inp_str


pacific-hake/hake-assessment documentation built on Jan. 14, 2025, 9:12 p.m.