elevate_children: elevate all children of a node

View source: R/elevate_children.R

elevate_childrenR Documentation

elevate all children of a node

Description

elevate all children of a node

Usage

elevate_children(parent, remove = TRUE)

Arguments

parent

an xml node (notably a block quote)

remove

a logical value. If TRUE (default), the parent node is removed from the document.

Value

the elevated nodes, invisibly

Examples

## Not run: 
scope <- Episode$new(file.path(lesson_fragment(), "_episodes", "17-scope.md"))
# get all the challenges (2 blocks)
scope$get_blocks(".challenge")
b1 <- scope$get_blocks(".challenge")[[1]]
elevate_children(b1)
# now there is only one block:
scope$get_blocks(".challenge")

## End(Not run)

carpentries/pegboard documentation built on Nov. 13, 2024, 8:53 a.m.