jupyter / jupyter/notebook

rendering non-breaking spaces

Open
#3,105 2 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

Hey

I'm running into an issue with some notebooks in french

so in french we would add a space before signs like colons and semicolons, something like this :

and to avoid line breaks between `this` and `:` we don't put a regular space but a non-breaking space

right now with jupyter if I insert this character in a markdown cell as a html escape : `like this :`, then all works fine; we get a space and it's not broken, when the width of the page falls between `this` and `:` they both go on the next line, it's fine.

on the other end if instead of that I insert a [unicode non-breakable space (\u00A0)](http://www.fileformat.info/info/unicode/char/00a0/index.htm), then I do get a space but it behaves like a regular space, and does not glue `this` and `:` that can end up on separate lines.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the behavior in a Markdown cell, comparing an HTML   escape with a Unicode U+00A0 space at a narrow page width. Trace the notebook's Markdown rendering entry point and verify that both forms keep the preceding text and punctuation together. Done means Unicode non-breaking spaces render visibly and prevent a line break like the HTML escape does.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.