withr::defer(
{
try_silently(close(attr(.knitr_asciicast_process, "sock")))
try_silently(.knitr_asciicast_process$kill())
},
teardown_env()
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.