code_from_editor: Converts raw editor text to a string of code

View source: R/decorate_chunk.R

code_from_editorR Documentation

Converts raw editor text to a string of code

Description

Raw editor text has been taken from an active RStudio session via rstudioapi::getSourceEditorContext(). Chunk delimiters and html is removed, all formatting is otherwise preserved.

Usage

code_from_editor(.contents, chunk_name)

Arguments

.contents

chunk contents passed from editor context

chunk_name

label of chunk

Value

chunk text


kbodwin/flair documentation built on Feb. 6, 2023, 4:24 p.m.