Checks if a markdown header with a certain level exists. If not, generates a feedback message. If yes, zooms in on the entire header section.

check_header(state, level, index = 1, not_found_msg = NULL,
  append = TRUE)

Arguments

state

the state to start from.

level

the level of the header to check

index

which h<level> header to check

not_found_msg

If specified, this overrides the automatically generated message in case not enough headers of the specified level were found.

append

Whether or not to append the feedback to feedback built in previous states

Value

A state that zooms in on the section under the header until the next same-level header.