Code Block Formatting/Fixers? #11063
Replies: 3 comments 2 replies
-
That's very unlikely as Quarto supports any possible programming languages either via This being said, you can build your own system as some users already did, see https://github.com/shafayetShafee/black-formatter for Black (Python). Any formatter and their settings is opinionated so it's best you do what you think is best in that regard. |
Beta Was this translation helpful? Give feedback.
-
Thanks!
Something like that would be cool. I think I might implement a
One final question. To make this work, is it possible to load a quarto pandoc -o ./tables.qmd ./tables.qmd and got
|
Beta Was this translation helpful? Give feedback.
-
True that. I will just let |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Hi everybody! Thank you again for this wonderful project.
Use Case
I was wondering if there is any known way to clean up poorly formatted documents. For instance, using injected formatters with conform.nvim I can get
python
,yaml
, and other languages fixed in my notebook throughnvim
. I would like to run this on some files in bulk in github actions - however this might be quite tricky or impossible withnvim
.I would like to note that I do not think the
quarto
command itself should do this, but am asking if there is a solution that already exists and if not, how to proceed possibly implementing a solution.As for my thoughts, I think it might be possible using
pandoc
filters and updating the files in place.Apparently, prettier is capable of fixing code blocks in markdown however only
js
based plugins can be used for this.What Would it Do?
This functionality could turn the following poorly formatted
quarto
documentinto
when the user specifies to use
black
andyamlfix
.Beta Was this translation helpful? Give feedback.
All reactions