Skip to content

indentation_linter: fenced code blocks inside enumeration in RMarkdown document #1945

Description

@klmr

Consider the following RMarkdown document, which has fenced code inside an enumeration:

* An enumeration item with code:

  ```{r}
  "Hello"
  ```

‘lintr’ has the spurious complaint

mwe.rmd:4:2: style: [indentation_linter] Indentation should be 0 spaces but is 2 spaces.
  "Hello"
~^

When removing the indent (which works, but is unconventional) and knitting the document, ‘knitr’ reinserts the indent in the output Markdown document.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions