posit-dev / posit-dev/positron

Markdown R code chunk inserts <> upon <

Open
#4,643 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: core enhancement
Dominant language
TypeScript
Stars
4.3k
Forks
184
Avg merge
1d 11h
Merged PRs (30d)
206

Description

System details:

Positron and OS details:

Positron Version: 2024.09.0 (Universal) build 27
Code - OSS Version: 1.92.0
Commit: d996153f3be6bcc9af460300e61103425323b973
Date: 2024-09-11T02:38:46.408Z
Electron: 30.1.2
Chromium: 124.0.6367.243
Node.js: 20.14.0
V8: 12.4.254.20-electron.0
OS: Darwin arm64 23.6.0

Interpreter details:

NA.

Describe the issue:

While editing an R code block in a simple Markdown document, the <> character sequence is inserted when < is input. This means that an additional character is injected into the document any time an R variable assignment is typed.

Steps to reproduce the issue:

Starting with the simple document:

```r

```

Within the code block, attempt to type v <- 42. The document will contain v <- 42> (assuming you do not intentionally delete the trailing > that was added).

Expected or desired behavior:

What I type is what I get and there is no automatic addition of < when in an R code block.

This is not exclusive to R. The same insertion happens in Python code blocks, too. Try to use the less-than symbol in a Python expression, for example. You'll have an additional > character.

Here is an R and Python example before cleaning up the extraneous characters.

image

Were there any error messages in the UI, Output panel, or Developer Tools console?

Contributor guide

Open the contributing guide

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. Reproduce the issue in a Markdown document with R and Python code blocks, checking the v <- 42 case and a Python less-than expression; done means typing < no longer inserts an extra >.

Written by the indexing model from the issue text.

Assessment

Tech stack
markdown, python, r
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.