Skip to content

[Docusaurus] Can't build website from mdx files with "error: quartoRawHtml is not defined" error (Quarto 1.4) #8331

@eitsupi

Description

@eitsupi

Bug description

docusaurus-md format including html output seems broken.

Steps to reproduce

---
title: foo
format: docusaurus-md
---

```{python}
#| filename: Python
import polars

polars.DataFrame({"foo": [1, 2,]})
```

Expected behavior

---
title: foo
format: docusaurus-md
---

export const quartoRawHtml =
[`<div><style>
.dataframe > thead > tr,
.dataframe > tbody > tr {
  text-align: right;
  white-space: pre-wrap;
}
</style>
<small>shape: (2, 1)</small>`,`</div>`];


```python title="Python"
import polars

polars.DataFrame({"foo": [1, 2,]})
```

<div dangerouslySetInnerHTML={{ __html: quartoRawHtml[0] }} />

| foo |
|-----|
| i64 |
| 1   |
| 2   |

<div dangerouslySetInnerHTML={{ __html: quartoRawHtml[1] }} />

Generated by Quarto CLI 1.4.432

Actual behavior

---
title: foo
format: docusaurus-md
---





```python title="Python"
import polars

polars.DataFrame({"foo": [1, 2,]})
```

<div dangerouslySetInnerHTML={{ __html: quartoRawHtml[0] }} />

| foo |
|-----|
| i64 |
| 1   |
| 2   |

<div dangerouslySetInnerHTML={{ __html: quartoRawHtml[1] }} />

Your environment

  • Ubuntu 22.04

Quarto check output

$ quarto check   
Quarto 1.4.545
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.11: OK
      Dart Sass version 1.69.5: OK
      Deno version 1.37.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.4.545
      Path: /opt/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: (not installed)
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Tex:  (not detected)

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.10.12
      Path: /usr/local/python/current/bin/python3
      Jupyter: 5.7.1
      Kernels: python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........OK
      Version: 4.3.2
      Path: /usr/local/lib/R
      LibPaths:
        - /workspaces/querying-with-prql/renv/library/R-4.3/x86_64-pc-linux-gnu
        - /usr/local/lib/R/library
      knitr: 1.45
      rmarkdown: 2.25

[✓] Checking Knitr engine render......OK

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocusaurusregressionFunctionality that used to work but now is broken.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions