detect_html_lang {accessrmd} | R Documentation |
Searches a file for valid methods of setting HTML lang attribute.
Description
Takes the output of 'readLines()' and looks for lang attribute value, stopping if no valid value is found. Typically used on the output of 'handle_rmd_path()'.
Usage
detect_html_lang(lines = NULL, lang_tags = langs)
Arguments
lines |
The output of 'readLines()' or 'handle_rmd_path()'. |
lang_tags |
A vector of valid lang subtag values, taken from https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry. Used to confirm whether the lang value is valid. |
Value
The lang attribute value if found. Stops if no value found.
[Package accessrmd version 1.0.0 Index]