quarto-dev / quarto-dev/quarto

Visual Editor incorrectly escapes '@' in Pandoc citations on drag-and-drop

Open
#859 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug visual-editor
Dominant language
TypeScript
Stars
645
Forks
62
Avg merge
17h 42m
Merged PRs (30d)
13

Description

Bug description

The following was reported by @crocodilusniloticus in RStudio repo rstudio/rstudio https://github.com/rstudio/rstudio/issues/16537

When dragging a plain-text Pandoc citation (e.g., [@smith2023]) from an external application like Zotero into the RStudio Visual Editor, the editor incorrectly escapes the at-sign, resulting in \[@smith2023].

Steps to Reproduce:
1. Configure Zotero with Better BibTeX to drag citations as plain-text Pandoc citations.
2. Drag a reference from Zotero into a plain text editor (like the RStudio Source Editor) to confirm it is correctly formatted as [@key].
3. Drag the same reference into the RStudio Visual Editor.

**Expected Behavior:**
The editor should insert the plain text as-is: `[@key]`

**Actual Behavior:**
The editor inserts escaped text: `\@key`, which breaks the Pandoc citation functionality."
Steps to reproduce

No response

Actual behavior

No response

Expected behavior

No response

Your environment

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source files or tests are named. Start by reproducing a drag from Zotero into the Visual Editor and trace how the plain-text [@key] input is handled; done means the editor preserves [@key] without escaping and Pandoc citation functionality remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
markdown, typescript
Domain
content, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.