process_images: Set alt attribute for image nodes; extract images from HTML...

View source: R/get_images.R

process_imagesR Documentation

Set alt attribute for image nodes; extract images from HTML blocks

Description

Markdown specification is not always clear about what goes in the text part of an image. Pandoc specifies a markdown image as alt= Since commonmark does not recognize the alt-text, we need to find it ourselves.

Usage

process_images(images, ns = tinkr::md_ns())

Arguments

images

an XML nodelist that contains blocs with image information

ns

the namespace to use

Details

Moreover, it's possible to include HTML images, so we need to parse the HTML to expose the alt text.

Value

a copy of the nodelist


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