Page MenuHomePhabricator

Making non-breaking spaces visible while editing
Closed, DeclinedPublic


This is a feature request, not a bug.

I'm using this editor

Screen Shot 2021-01-13 at 8.01.11 AM.png (1×2 px, 567 KB)
. I put my cursor next to a NBSP HTML entity. The presence or absence of a toolbar should not matter.

Currently, entering a non-breaking space using HTML code makes the text harder to read in the editor window, as the HTML entity breaks the flow of reading naturally in a way that non-alphanumeric characters such as wikilink brackets don't. You can also enter it as an actual non-breaking space, which doesn't disrupt flow, but it looks no different from a regular space, and future editors won't be able to tell the difference.

What if actual non-breaking spaces were given a light gray outline in the editor window, maybe with the letters NB inside on English projects, to distinguish them from normal spaces, and people would switch from using the HTML code to actually entering it as is? It also improves on page size; I believe the HTML entity uses 6 bytes, while the actual character uses only 2 in UTF-8.

Event Timeline

Aklapper changed the task status from Open to Stalled.Jan 13 2021, 11:48 AM

Hi @HotdogPi, thanks for taking the time to report this and welcome to Wikimedia Phabricator!
Unfortunately this Wikimedia Phabricator task lacks some information, for example which editor software this is about.
If you have time and can still reproduce the situation: Please add a more complete description to this task. That should be

  • a clear and complete list of exact steps to reproduce the situation, step by step, so that nobody needs to guess or interpret how you performed each step,
  • what happens after performing these steps to reproduce,
  • what you expected to happen instead,
  • a full link to a web address where the issue can be seen.

You can edit the task description by clicking Edit Task. Ideally, a good description should allow any other person to follow these steps (without having to interpret steps) and see the same results. Problems that others can reproduce can get fixed faster. Thanks again!

If you're talking about the plain text editor (where you have a plain text area without any outlining or syntax highlight), there's no possibility to outline non-breaking spaces nor anything.

If you're talking about the CodeMirror editor, it may be doable (if not done already), and this task would need to be assigned to that project.

@HotdogPi: Hi, we don't know what "the default MediaWiki editor" is, as that depends on personal settings plus default settings per wiki.
Please see my previous comment and follow the two links, no matter if bug or feature request. Thanks a lot! :)

HotdogPi renamed this task from Non-breaking spaces to Making non-breaking spaces visible while editing.Jan 13 2021, 12:42 PM
HotdogPi updated the task description. (Show Details)

@HotdogPi Can you attach a screenshot where we can see the editor you're using? That would probably be more helpful than a description

Aklapper changed the task status from Stalled to Open.Jan 13 2021, 1:06 PM

See T271906#6743248 - this is technically not possible in a plain text editor. Feel free to use a different editor if this request is important to you.

If you're talking about the CodeMirror editor, it may be doable (if not done already), and this task would need to be assigned to that project.

See T181677: Implement syntax highlight for U+00A0 (no-break space, nbsp).