jupyter / jupyter/notebook

Markdown code block rendering issues with dollar signs ($)

Open
#4,382 0 comments 1 reaction 0 assignees View on GitHub
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:

![screen shot 2019-02-01 at 6 51 00 pm](https://user-images.githubusercontent.com/9683693/52157134-5e227100-2652-11e9-9516-a03783df8fba.png)

Contributor guide

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.