quarto-dev / quarto-dev/quarto
Image caption formatting lost when switching from Source to Visual mode
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 645
- Forks
- 62
- Avg merge
- 17h 42m
- Merged PRs (30d)
- 13
Description
Bug description
When I put image caption text in italics, add a link to the image, switch to Source as the editor, then switch back to Visual as the editor, the italics formatting is lost. The example document below reproduces this behavior. (I also lose caption formatting on one of my pages when rendering the document, but am unable to reproduce that behavior with the example below.)
Steps to reproduce
---
title: "Bug Example"
author: "Lindsay Clark"
---
```{r}
png("example_image.png")
plot(1:10, 1:10)
dev.off()
```
[](example_image.png)
Expected behavior
When I switch back and forth between editors, I expect the formatting to say the same.
Actual behavior
The asterisks that indicate italics formatting get stripped out of the document. I tried HTML tags, and these are also lost.
Your environment
- IDE: RStudio/2023.12.0+369
- OS: Windows 11
Quarto check output
[>] Checking versions of quarto binary dependencies...
Pandoc version 3.1.1: OK
Dart Sass version 1.55.0: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
Version: 1.3.450
Path: C:\Program Files\RStudio\resources\app\bin\quarto\bin
CodePage: 1252
[>] 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.3.1
Path: C:/PROGRA~1/R/R-43~1.1
LibPaths:
- C:/Users/drago/AppData/Local/R/win-library/4.3
- C:/Program Files/R/R-4.3.1/library
knitr: 1.45
rmarkdown: 2.25
[>] Checking Knitr engine render......OK
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the supplied Markdown document and the Source-to-Visual editor switches, then compare the document before and after the conversion. Done means italic and HTML caption formatting, including the linked image caption, remains intact when switching between editor modes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- markdown
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100