Skip to content

Cloze syntax {{}} fails to render when containing LaTeX superscripts/subscripts (^{}) #769

@Xanaxus

Description

@Xanaxus

Search first

  • I searched and no similar issues were found

What Happened?

The {{cloze}} macro fails to render interactively when the same block contains inline subscript or superscript syntax (e.g., ^{ } or _{ }). The cloze card is displayed as plain, non-interactive text instead of a hideable/revealable element.

Reproduce the Bug

  1. Create a new Logseq page.
  2. Type the following content inside an existing block (ensure it is indented to create a sub-block):
 This is usally highlighted by the accumulation of the {{cloze Ca^{ +2} ions}} . This will be seen as {{cloze <ins>large flocculent amorphous densities in TEM</ins>}}
  1. Switch to the flashcard / review view and attempt to interact with the cloze card.

Expected Behavior

The {{cloze Ca^{+2} ions}} macro should render as a normal interactive cloze deletion — hiding the content and revealing it on click/tap.
The superscript (^{+2}) inside the cloze should render correctly as Ca²⁺ within the hidden/revealed element.

Files

Image Image

Browser, Desktop or Mobile Platform Information

OS: MacOS
Verision: 2.0.1 a0b1093

Additional Context

No response

Are you willing to submit a PR? If you know how to fix the bug.

  • I'm willing to submit a PR (Thank you!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions