Invisible character (`​`) in package names
I've noticed that there is this invisible character (​) in package names.
For reference:
It's the Unicode Character 'ZERO WIDTH SPACE' (U+200B) .
this character is intended for line break control; it has no width, but its presence between two characters does not prevent increased letter spacing in justification
It occurs in words that are "combinations", e.g. SublimeLinter -> Sublime + Linter Examples pages:
- https://packagecontrol.io/packages/SublimeLinter
- https://packagecontrol.io/packages/BracketHighlighter
- https://packagecontrol.io/packages/ColorHelper
Just open the 1st one, rightclick the "SublimeLinter" title and press Inspect :
screenshot

If you select that text in your browser and press Copy (Ctrl+C) then the copied string "SublimeLinter" contains the hidden character: screenshot. [if you doubleclick the above string you'll notice that you can select only either 'Sublime' or 'Linter'] and that leads to getting no results when using it to search for the package in Sublime Text's Package Control manager.
e.g. I have installed SublimeLinter. If I open ST3 Preferences | Package Control | List Packages and paste the string "SublimeLinter" (with the hidden character) I'll get no results.
Using ST3 3211 x64 on win10.
This is on purpose, as it allows long package names to wrap on small screens. https://github.com/wbond/packagecontrol.io/blob/master/app/templates/helpers/word_wrap.py
This pattern is used on various online docs by various organizations, since they also run into long identifiers without spaces.
Thanks for replying.
I mentioned this, hoping that maybe it could be possible to remove it without breaking things. I see that's not possible, i.e. that's necessary, so I'm closing this.
PS. For anyone interested, here is a userscript that removes the hidden character from the package title:
// ==UserScript==
// @name packagecontrol.io - remove invisible character in package name
// @match https://packagecontrol.io/packages/*
// @grant none
// ==/UserScript==
var re = /\u200B/g;
var packageTitle = document.querySelector('#content > h1');
packageTitle.innerHTML = packageTitle.innerHTML.replace(re, '');
I haven't checked recently, perhaps there is a more modern CSS method that we can use now in 2021? This was originally added in probably 2014/2015.
That would be great!
Apparently, the <wbr> element should be used to suggest word break locations https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Text/Wrapping_Text#the_wbr_element.