Evaluate code and syntax highlight the results
This function runs code
and captures the output using
evaluate::evaluate()
. It syntax highlights code with highlight()
,
and combines all results into a single HTML div.
evaluate_and_highlight( code, fig_save, classes = downlit::classes_pandoc(), env = NULL )
code |
Code to evaluate (as a string). |
fig_save |
A function with arguments |
classes |
A mapping between token names and CSS class names.
Bundled |
env |
Environment in which to evaluate code; if not supplied, defaults to a child of the global environment. |
An string containing HTML.
evaluate_and_highlight("1 + 2")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.