clean_source: Clean the source text from a cell.

Description Usage Arguments Value

View source: R/clean_source.R

Description

Clean the source text from a cell.

Usage

1
2
3
4
5
clean_source(
  cell_source = list(),
  cell_type = c("code", "markdown"),
  keep_comments = TRUE
)

Arguments

cell_source

The code source as a list of lines of text.

cell_type

The type of cell the source came from.

keep_comments

Should comments (# ...) be kept in code cells?

Value

A character vector of length 1, where the cleaned text has been collapsed into a single string (lines delimited by \n).


adamblake/nbsimplegrader_companion documentation built on April 19, 2020, 6:05 p.m.