Skip to content

Visual Editor loses raw latex code blocks #558

@gtritchie

Description

@gtritchie

NOTE: This issue is due to a pandoc change, and also impacts the RStudio IDE (rstudio/rstudio#15253). I am working on a fix for both the IDE and the VSCode extension.

See also #552, already fixed.

Steps to reproduce the problem

  • Using extension version 1.115.0 in VSCode 1.93.1
  • Create a new Quarto document, edit in non-visual mode, add following:
---
title: "Raw tex Block Issue"
---

```{=tex}
\LaTeX
```

```{=latex}
\LaTeX
```

Save the file, then Edit in Visual Mode. The latex block looks ok, but the tex block has lost its specialness.

Image

Now switch back to source (non-visual) mode.

Describe the problem in detail

In Visual Mode, the tex block is removed leaving just the contents. The latex block looks ok in Visual Mode initially, but the underlying document has changed to:

---
title: "Raw tex Block Issue"
---

\LaTeX

\LaTeX

Describe the behavior you expected

Preserve the latex raw block as we did before the pandoc change.

Note that {=tex} being removed was already present before the pandoc change, so not covered by this issue.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions