Markdown code block rendering issues with dollar signs ($)
- Dominant language
- Jupyter Notebook
- Stars
- 13.3k
- Forks
- 5.8k
- Avg merge
- 6d 11h
- Merged PRs (30d)
- 7
Description
So when rendering R code in a jupyter notebook inside jupyter labs, the following occurs:
My markdown (rendered by this issue):
No escapes:
```R
# Open a dataset from the file myfile.RData and name it myData:
myData <- load("myfile.RData")
# Create new variable called age_squared equal to each person's age squared:
myData$agesquared <- myData$age * myData$age
```
With single escape:
```R
# Open a dataset from the file myfile.RData and name it myData:
myData <- load("myfile.RData")
# Create new variable called age_squared equal to each person's age squared:
myData\$agesquared <- myData\$age * myData\$age
```
With double escape:
```R
# Open a dataset from the file myfile.RData and name it myData:
myData <- load("myfile.RData")
# Create new variable called age_squared equal to each person's age squared:
myData\\$agesquared <- myData\\$age * myData\\$age
```
Screenshot in Jupyter Labs Notebook:

Contributor guide
Research direction
Start by reproducing the Markdown code-block rendering in a JupyterLab notebook with the provided R examples, comparing unescaped, single-escaped, and double-escaped dollar signs. Done means dollar signs in the R code block render as literal characters without requiring escapes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, markdown, r
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100