Notebook: Problem with rendering of formatted markdown cells

Created on 22 Aug 2018  路  15Comments  路  Source: jupyter/notebook

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.

good first issue

Most helpful comment

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.

All 15 comments

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.

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

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

Perhaps upgrading to marked 0.5 (released in August) would fix this? https://github.com/jupyter/notebook/blob/d772277c0bcaf129771e774e17310379cfa6652b/bower.json#L16

Indeed, it looks like this is a bug that was fixed in marked 0.5: https://github.com/markedjs/marked/issues/1306

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

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.

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

@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.

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.

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

@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.

This is still not in a stable release.

@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? 馃槄

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!

Was this page helpful?
0 / 5 - 0 ratings