Example

Demo of catchandrelease

Catch Code

This filter is designed to extract the text from the following code blocks:

1 + 1
print("hello")
sd(c(1,2,3))
x = c(1,2,3)

mean(x)

Release

Once the code is extracted, the filter will then insert at the end of the document the lines of code via JSON.


[{"code":"1 + 1"},{"code":"print(\"hello\")"},{"code":""},{"code":"sd(c(1,2,3))"},{"code":"x = c(1,2,3)\n\nmean(x)"},{"code":""}]