### Bug description

If we have the following code inside of a Lua filter that is included as a `quarto` extension:

```lua
  -- Sample initialization
  local example_text = [[
    <script>
    // the hello world program
    document.write('Hello, World!');
    </script>
  ]]

  -- Insert the web initialization
  -- https://quarto.org/docs/extensions/lua-api.html#includes
  quarto.doc.include_text("in-header", example_text)
```

The `quarto.doc.include_text()` fails to include the text inside of the `header` under the `revealjs` format. However, it works under the `html` format option. Per the Lua documentation at:

<https://quarto.org/docs/extensions/lua-api.html#includes>

I feel like this should be a bug as the `revealjs` format is a version of an `html` document.

You can experiment and see more details on the `quarto.doc.include_text()` use with the filter here:

https://github.com/coatless/quarto-ext-revealjs-bug 


### Checklist

- [X] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [X] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
- [X] Please provide the output of `quarto check` so we know which version of quarto and its dependencies you're running.
dragonstyle
2023-05-24T18:18:19Z
coatless
bug upstream pandoc-lua
open
quarto.doc.include_text does not add text into revealjs
https://github.com/quarto-dev/quarto-cli/issues/5666