### Bug description

Consider the minimal working example:

``````
---
title: "MWE"
format:
  docx:
    toc: false
    number-sections: false
---
Some text

::: callout-tip
## Solution

```{r}
1 + 1
```
:::
``````

Render the document gives

```
processing file: callout.qmd
  |.......................                                               |  33%
  ordinary text without R code

  |...............................................                       |  67%
label: unnamed-chunk-1
  |......................................................................| 100%
  ordinary text without R code


output file: callout.knit.md

pandoc 
  to: docx
  output-file: callout.docx
  default-image-extension: png
  toc: false
  number-sections: false
  
metadata
  title: MWE
  
An error occurred
Found a nested callout in the document. Please fix this issue and try again.
```

## Expected behaviour

A `.docx` be render.

![Screenshot from 2022-09-08 11-33-10](https://user-images.githubusercontent.com/1506457/189028264-f4013d10-b9cd-48f8-b973-1d9fa82982ef.png)

## Observed behaviour when render to HTML

Render reports zero errors.

![Screenshot from 2022-09-08 11-31-17](https://user-images.githubusercontent.com/1506457/189028356-b5ea6659-56d3-4769-8809-8cdd6eb6ff10.png)

## Environment

```
$ quarto check
[✓] Checking Quarto installation......OK
      Version: 1.2.73
      Path: /opt/quarto/bin
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....(None)
      Unable to locate an installed version of Python 3.
      Install Python 3 from https://www.python.org/downloads/
[✓] Checking R installation...........OK
      Version: 4.1.3
      Path: /opt/conda/lib/R
      LibPaths:
        - /opt/conda/lib/R/library
      rmarkdown: 2.16
[✓] Checking Knitr engine render......OK
$ quarto tools check
[✓] Inspecting tools
Tool         Status            Installed     Latest  
chromium     Not installed     ---           869685  
tinytex      Not installed     ---           v2022.09
```

### 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.
2022-09-08T03:35:54Z
rgaiacs
bug
closed
Render document with R code block inside callout to DOCX fail
https://github.com/quarto-dev/quarto-cli/issues/2346