quarto.shortcode

error_output

function quarto.shortcode.error_output(name: string, message_or_args: string|string[], context: "block"|"inline"|"text")
  -> string|pandoc.Blocks|pandoc.Inlines

Produce output for a shortcode that failed to execute properly.

This is useful for shortcode developers to provide error output consistent with how Quarto shortcodes provide error output.

context:
    | "block"
    | "inline"
    | "text"

read_arg

function quarto.shortcode.read_arg(args: string[], n: number|nil)
  -> string|nil

Read the n-th shortcode argument from the passed args table.