### Bug description

Hi all,

I am trying to adapt some of my old RMD templates, and I have a strange issue.  When I render a .qmd file to DOCX, the `flextable` package complains that `pandoc version >= 2 required for printing flextable in docx`

The thing is, quarto reports that `quarto pandoc --version` is `pandoc 2.19.2`

I've tried reinstalling the package, and fiddling around, but to no avail.  I know the easy solution would be to not use `flextable` but it's embedded in all of my fancy templates.

Interestingly, this works just fine in RStudio with the original RMarkdown version of the file.

It seems to fail with any .qmd file:

```
---
title: test
output:
    docx: default
---

{r}
library(flextable)
library(readr)
flextable(read_csv("a.csv") )


```

Quarto is Version: 1.2.247

### 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.
cscheid
2023-03-20T17:27:23Z
jlgraves-ubc
bug needs-repro
Future
closed
Flextable and Pandoc
https://github.com/quarto-dev/quarto-cli/issues/4896