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


r-for-educators/flair documentation built on Jan. 31, 2023, 11:18 a.m.