Replies: 1 comment 6 replies
-
You can define a Lua filter, see https://quarto.org/docs/extensions/filters.html. Knitr specific options needs to be passed according to the documentation: https://quarto.org/docs/computations/r.html#knitr-options For more, please provide a small self-contained "working" (reproducible) example to work with, i.e., a complete Quarto document or a Git repository. You can share a self-contained "working" (reproducible) Quarto document using the following syntax, i.e., using more backticks than you have in your document (usually four If you have multiple files (and if it is absolutely required to have multiple files), please share as a Git repository. ````qmd
---
title: "Reproducible Quarto Document"
format: html
engine: knitr
---
This is a reproducible Quarto document using `format: html`.
It is written in Markdown and contains embedded R code.
When you run the code, it will produce a plot.
```{r}
plot(cars)
```

The end.
```` Additionally and if not already given, please share the output of |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Suppose I have the following:
How can I exclude
# nolint ...
from being rendered out?I have found that knitr supports
tidy
chunk option of custom function (source) which in my case will look like this:function(code, ...) gsub(pattern = "#\\s?nolint.*|#\\s?styler:.*", replacement = "", code)
.This however seems to be not supported (source).
I can of course go ahead and add it in each chunk I have but that's not so DRY and I am interested in a global setting (presumably specified in
_quarto.yaml
config file).Initially I wanted to post it as a feature request but before that - do you see any other way (not necessarily via
tidy
option) to achieve what I want?Related: #793
Beta Was this translation helpful? Give feedback.
All reactions