Skip to content

Visual editor un-nests spans #762

@andrewpbray

Description

@andrewpbray

Bug description

When authoring slides in revealjs format, the following slide, featuring nested spans, renders as intended: each fragment fading in on click, each with a colored span, all in the same paragraph.

---
format: revealjs
---

## Title

::: {style="text-align: center"}
[One [hen]{style="color: red"}]{.fragment} [two [ducks]{style="color: blue"}]{.fragment}
:::

When I click into the visual editor, then click back, the sourced has been changed to:

---
format: revealjs
---

## Title

::: {style="text-align: center"}
[One ]{.fragment}[hen]{style="color: red"} [two ]{.fragment}[ducks]{style="color: blue"}
:::

In other words, it unnests the spans, which has the effect of breaking the animation.

I can fix the animation by putting the fade in fragments as divs instead of spans, but then it breaks the all-in-one-paragraph layout.

This is using the RStudio IDE 2022.07.0 Build 548 "Spotted Wakerobin" on MacOS Catalina 10.15.7.

Thanks for the help!

quarto check Output

[✓] Checking Quarto installation......OK
      Version: 1.0.20
      Path: /Applications/quarto/bin

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

[✓] Checking Python 3 installation....OK
      Version: 3.9.1
      Path: /usr/local/bin/python3
      Jupyter: 4.11.0
      Kernels: python3

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

[✓] Checking R installation...........OK
      Version: 4.2.1
      Path: /Library/Frameworks/R.framework/Resources
      LibPaths:
        - /Library/Frameworks/R.framework/Versions/4.2/Resources/library
      rmarkdown: 2.14

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

quarto tools check Output

[✓] Inspecting tools

Tool         Status            Installed     Latest  
chromium     Not installed     ---           869685  
tinytex      Not installed     ---           v2022.07

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions