Skip to contents

Render a terminal frame as a Markdown code block

Usage

render_markdown(x, width = 80, height = 24, trim = TRUE)

Arguments

x

A widget, Screen, App, or ScreenBuffer.

width, height

Frame size in cells.

trim

Remove trailing spaces from each line?

Value

A fenced Markdown text block.

Examples

cat(render_markdown(label("Hello"), width = 20, height = 2))
#> ```text
#> Hello
#> 
#> ```