Skip to content

style R Markdown (code chunks) #13

@lorenzwalthert

Description

@lorenzwalthert

It would be nice if styler could not only format plain .R files, but also .Rmd files.

Code Chunks

This could probably by implemented by changing transform_files, i.e. adding a function transform_lines_rmd_chunk. Main steps are:

  • first read read_lines_enc
  • look for regex ^´´´\\{r.*\\} *$ and ^``` *$
  • transforming lines between these expressions while leaving everything else unchanged
  • write back with write_lines_enc

@krlmlr maybe this functionality fits even in the utf8 package?

Plain Text

  • Line breaks if text is longer than 80 characters
  • punctuation (i.e. space after . , ? ! ect.)

The second point might be out of the scope of the package though...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions