https://github.com/spyder-ide/spyder-docs/pull/332 Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code + Explore + All features + Documentation + GitHub Skills + Blog * Solutions + By Plan + Enterprise + Teams + Compare all + By Solution + CI/CD & Automation + DevOps + DevSecOps + Case Studies + Customer Stories + Resources * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles + Repositories + Topics + Trending + Collections * Pricing [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} spyder-ide / spyder-docs Public * * Notifications * Fork 120 * Star 21 * Code * Issues 9 * Pull requests 2 * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Security * Insights 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. Pick a username [ ] Email Address [ ] Password [ ] [ ] Sign up for GitHub 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 Jump to bottom Fix: remove a ZERO WIDTH NO-BREAK SPACE in front of an inline literal. #332 Open JulienPalard wants to merge 1 commit into spyder-ide:master base: master Choose a base branch [ ] Branches Tags Could not load branches Branch not found: {{ refName }} {{ refName }} default Could not load tags Nothing to show {{ refName }} default Are you sure you want to change the base? Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated. Change base from JulienPalard:mdk-typo Open Fix: remove a ZERO WIDTH NO-BREAK SPACE in front of an inline literal. #332 JulienPalard wants to merge 1 commit into spyder-ide:master from JulienPalard:mdk-typo +1 -1 Conversation 6 Commits 1 Checks 3 Files changed 1 Conversation This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters Show hidden characters JulienPalard Copy link Contributor @JulienPalard JulienPalard commented Oct 5, 2022 This is literally the smallest PR I've ever done. It removes a zero width no-break space. But this char was breaking the inline literal next to it, see in this page, the ``is_dark_font_color`` should have been interpreted by Sphinx and rendered in red: Capture d'ecran du 2022-10-05 22-27-06 The removed character is obviously not rendered in github "files changed" interface. Not in git diff, and git show --color-words either. Not in your editor, and not in your terminal, ... The character is a space. And a space with no width!!! If you really want to see it, a git show | cat -A can be helpfull, you'll see something like: -in the ``mainwindow.py`` file we import the M-oM-;M-?``is_dark_font_color`` +in the ``mainwindow.py`` file we import the ``is_dark_font_color`` But the paragraph is way longer than that so it's a bit hard to spot. For the curious the M-... notation denotes bytes in the range [128; 255]. The 32 first of this range are then treated as if they were in the range [0; 32] and displayed using the ^ notation, so \x80 is M-^ @, and the other ones are just substracted by 128, so \xa0 is M- (yes a space). So M-o is \x6f + 128 (\x6f is the value for o in the ASCII table) = \ xef. M-; is \xbb and M-? is \xbf. Gives us the sequence \xef\xbb\xbf. Still curious? The file is encoded using UTF-8, so to decode this UTF-8 sequence we need to extract relevant bits from it. In binary it looks like: 11101111 10111011 10111111 The leading 1110 means "There's 3 bytes for this char" (Count the ones, three ones - three bytes. The zero is just a delimiter). The trailing two bytes starts with "10" meaning "we're trailing bytes". If we drop those markers (1110 and 10 in front of bytes) and keep the remaining bits we're left with 1111111011111111, which evaluates to 65279, which is in hexadecimal0xfeff. Yes, you recognize it, it's a BOM. Because yes a BOM is just a ZERO WIDTH NO-BREAK SPACE, isn't it beautiful? Do we really have to do the bit manipulation to discover what this character was? Obviously not, just use emacs' M-x describe char on it: position: 4646 of 14699 (32%), column: 380 character: (displayed as ) (codepoint 65279, #o177377, #xfeff) charset: unicode (Unicode (ISO10646)) code point in charset: 0xFEFF script: arabic syntax: w which means: word to input: type "C-x 8 RET feff" or "C-x 8 RET ZERO WIDTH NO-BREAK SPACE" buffer code: #xEF #xBB #xBF file code: #xEF #xBB #xBF (encoded by coding system utf-8-unix) display: by this font (glyph code): ftcrhb:-GOOG-Noto Naskh Arabic UI-normal-normal-normal-*-18-*-*-*-*-0-iso10646-1 (#x5D5) Character code properties: customize what to show name: ZERO WIDTH NO-BREAK SPACE old-name: BYTE ORDER MARK general-category: Cf (Other, Format) decomposition: (65279) ('') And this is literally the longest PR description I've written. Sorry, something went wrong. 71 aroberge, adamerose, ethangclark, christiangenco, aprofeit, woopla, Exac, kdheepak, ezekg, mritzmann, and 61 more reacted with laugh emoji [?] 26 petecooper, sentyaev, Crisfole, severo, JAStanton, tylermaran, inputsh, katsadim, f0rodo, divad, and 16 more reacted with heart emoji All reactions * 71 reactions * [?] 26 reactions @JulienPalard Fix: remove a ZERO WIDTH NO-BREAK SPACE in front of an inline literal. 2f14dbd LaurensDeV LaurensDeV approved these changes Oct 5, 2022 View changes LaurensDeV LaurensDeV suggested changes Oct 5, 2022 View changes Copy link @LaurensDeV LaurensDeV left a comment Sorry, something went wrong. All reactions @aprofeit Copy link aprofeit commented Oct 5, 2022 Is this a one off? Or could there be others. Look how many PR words you had to write to fix this one! 2 ramonsnir and freezed reacted with thumbs up emoji All reactions * 2 reactions Sorry, something went wrong. vvilliamperez vvilliamperez approved these changes Oct 5, 2022 View changes ad-m-ss ad-m-ss approved these changes Oct 5, 2022 View changes Copy link @ad-m-ss ad-m-ss left a comment LGTM :shipit: Sorry, something went wrong. All reactions @JulienPalard Copy link Contributor Author JulienPalard commented Oct 5, 2022 Is this a one off? Or could there be others. Look how many PR words you had to write to fix this one! I discovered it while working on a new test on sphinxlint, and according to sphinx-lint this is the only one. Just for good measure, I just tried git grep $'\xef\xbb\xbf', and don't see any other. All reactions Sorry, something went wrong. @CAM-Gerlach CAM-Gerlach added the type:Bug label Oct 5, 2022 @OJFord Copy link OJFord commented Oct 5, 2022 * edited The removed character is obviously not rendered in github "files changed" interface. For whatever idle curiosity it's worth, it is for me, in the GitHub Android app: Screenshot_20221005-232106~2.png i.e. obviously not in terms of a source character or anything with width, but it does similarly affect Github's own rendering. All reactions Sorry, something went wrong. @CAM-Gerlach CAM-Gerlach assigned JulienPalard Oct 5, 2022 @MFogleman Copy link MFogleman commented Oct 5, 2022 Any idea what introduced the zero width whitespace? All reactions Sorry, something went wrong. Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment Reviewers @LaurensDeV LaurensDeV @vvilliamperez vvilliamperez @ad-m-ss ad-m-ss At least 1 approving review is required to merge this pull request. Assignees @JulienPalard JulienPalard Labels type:Bug Projects None yet Milestone No milestone Development Successfully merging this pull request may close these issues. None yet 8 participants @JulienPalard @aprofeit @OJFord @MFogleman @LaurensDeV @vvilliamperez @ad-m-ss @CAM-Gerlach Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Footer (c) 2022 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.