Skip to content

Switching to visual mode in removes literal semicolon in citation. #14376

Open

Description

@wjschne

System details

RStudio Edition : Desktop or Server 
RStudio Version : 2023.12.1+402
OS Version      :  Windows 11 Home
R Version       :  4.3.3 (2024-02-29 ucrt)

Steps to reproduce the problem

  1. Create a .qmd file.
  2. Switch to source mode.
  3. Type [APA\;@mycitation].
  4. Switch to visual mode.
  5. Switch back to source mode.
  6. The citation appears as [APA; @mycitation], which will render improperly.

Describe the problem in detail

When writing in a Quarto document, sometimes you need to introduce an acronym in a sentence that also has a citation. In APA style, this requires a literal semicolon to separate the acronym from the citations:

The leading organization for psychologists in the U.S. is the American Psychological Association [APA\;@mycitation].

This will render correctly to:

The leading organization for psychologists in the U.S. is the American Psychological Association (APA; Schneider, 2024).

Switching to visual mode in a Quarto file removes the backslash, which will render incorrectly to:

The leading organization for psychologists in the U.S. is the American Psychological Association [APA; Schneider (2024)].

Describe the behavior you expected

Switching to visual mode should not remove the backslash needed to render a literal semicolon.

  • [x ] I have read the guide for submitting good bug reports.
  • [ x] I have installed the latest version of RStudio, and confirmed that the issue still persists.
  • If I am reporting an RStudio crash, I have included a diagnostics report.
  • [x ] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

Activity

  1. added
    new
    on Mar 6, 2024
  2. ronblum commented on Mar 6, 2024

    @ronblum
    Contributor

    @wjschne Thank you for raising this! Also reproducible RStudio Desktop 2022.12.0+353 and 2024.04.0-daily+531 on MacOS 14.4.

  3. added
    visual markdown
    and removed
    new
    on Mar 6, 2024
  4. jthomasmock commented on Mar 8, 2024

    @jthomasmock
    Contributor

    We should test whether canonical mode also removes the semi-colon @ronblum

  5. ronblum commented on Mar 8, 2024

    @ronblum
    Contributor

    Both canonical and non-canonical mode remove the semicolon.

  6. added this to the Product Backlog milestone on Mar 11, 2024
  7. jthomasmock commented on Mar 11, 2024

    @jthomasmock
    Contributor

    Thanks @wjschne -- we are going to look at a few different visual markdown items in the future - thank you for raising!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugvisual markdown

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions