Open aronatkins opened 1 year ago
The syntax relies on Pandoc's syntax and no-space is required for the raw code block with class and attributes to be valid.
I don't think we can do much on the extension itself about that because the extension will do nothing - it is done in Lua and it would not get applied because AST would not contained a CodeBlock with include
attribute which is what it checks.
Probably this would be improvment to do like YAML syntax linter in our editors to help find those spaces. Note that visual editor does not also see the second as a code block and would not format it as you would expect.
Do you have suggestion in mind on how to improve this ?
I don't have a suggestion, no. Feel free to wontfix this if it's a restriction imposed by Pandoc.
As I mentioned, I had started with the knitr embed engine and, after encountering problems there, fell over to this option. I missed the fact that we went from meaningless-to-meaningful whitespace.
The story might change again once "include" works natively in Quarto, so again, no big deal.
This example document contains two "include" instances; the first instance includes the referenced file as expected. The second instance adds the
{.yaml include = "stuff.yml"}
text in the document.