Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with rendering of formatted markdown cells #3874

Closed
Icarwiz opened this issue Aug 22, 2018 · 15 comments · Fixed by #4046
Closed

Problem with rendering of formatted markdown cells #3874

Icarwiz opened this issue Aug 22, 2018 · 15 comments · Fixed by #4046

Comments

@Icarwiz
Copy link

Icarwiz commented Aug 22, 2018

It seems to me a new problem appeared regarding rendering of markdown cells (I'm not exactly sure in which version, but I think it appeared with 5.6.0).

When I type this in a markdown cell:

test i is index test

The highlighting in the unrendered cell is good, but when rendered, it does it badly and shows in bold characters :

i** is **index

To be sure it is not a problem due to my own specific configuration, I checked that the problem exists in Notebooks of http://jupyter.org/try as well...

And it does.

@gitvishy
Copy link

Seems like a bug in a recent Jupyter update. I'm seeing the same issue in older notebooks where the markdown rendered as expected previously, but now shows the error.

It looks like if there is a bold or italic markdown of only 1 letter followed by another on the same line, it's thrown off.

This is **A** test of **bold** text. renders incorrectly as:
This is A** test of **bold text.

This is **AA** test of **bold** text. renders correctly as:
This is AA test of bold text.

The issue occurs only when there is a 1-letter bold/italic followed by another on the same line.
This is **A** test

of **bold** text. renders as:
This is A test

of bold text.

@jasongrout
Copy link
Member

Just for comparison, it does look like marked (our markdown renderer) handles this correctly: https://marked.js.org/demo/?text=This%20is%20**A**%20test%20of%20**bold**%20text.

@jasongrout
Copy link
Member

I can confirm that I see this same problem in notebook 5.7.0: This is **A** test of **bold** text. renders incorrectly.

@jasongrout
Copy link
Member

Perhaps upgrading to marked 0.5 (released in August) would fix this?

"marked": "~0.4",

@jasongrout
Copy link
Member

Indeed, it looks like this is a bug that was fixed in marked 0.5: markedjs/marked#1306

@surya-prakash-susarla
Copy link
Contributor

Is the issue closed? Could someone suggest how I can start contributing to the project?

@jasongrout
Copy link
Member

The issue is still open, thanks for volunteering! https://jupyter-notebook.readthedocs.io/en/stable/contributing.html gives tips on getting started. I think the fix may be as easy as changing the line mentioned above to get marked version ~0.5.

@jasongrout
Copy link
Member

Feel free to ask questions here or on the gitter: https://gitter.im/jupyter/notebook

@surya-prakash-susarla
Copy link
Contributor

@jasongrout Thanks for the update. I'll start working on the fix and learning how to contribute to the project. If possible please assign the bug to me.

@Gabrui
Copy link

Gabrui commented Jan 2, 2019

I still have the same bug even on the 5.7 release. I checked the release source (https://github.com/jupyter/notebook/archive/5.7.0.tar.gz) and it is still the 0.4 marked version.

@ICTSoEasy
Copy link

Me too - using latest anaconda release and not sure how to force it to use markdown 0.5 :(

@ackalker
Copy link

ackalker commented May 7, 2019

@Gabrui @ICTSoEasy
The pull request #4046 which updates Marked version is only on the master branch, following the 5.7.0 release of notebook, so it isn't in any stable release yet.

@minrk could we please get this update into a stable release? Thanks in advance.

@norvig
Copy link

norvig commented Feb 5, 2020

This is still not in a stable release.

@kevin-bates
Copy link
Member

@norvig - I'm seeing that PR #4046 is available in all Notebook releases >= 6.0. Are you using an older version of NB or suggesting that NB 6.x should not be considered stable? 😅

@norvig
Copy link

norvig commented Feb 9, 2020

You are correct. My mistake. I was given the advice to run "pip install -U jupyter"; that only gave me 5.6. With some further research I see that "pip install notebook --upgrade" gives me 6.0.3.

That's a huge help, thanks!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants