Formatting text as monospace with backticks `` (Ctrl+L shortcut works fine) shifts all following words’ formatting (in the same paragraph) 2 symbols left (like a sliding window).
How To Reproduce It
Go to the Anytype text editor window (create a note, page, etc.)
Type text in one block (paragraph)
Highlight and format some text (bold, italic, monospace, etc.) any way you wish (shortcut, mouse, etc.). We will call this formatted text “Substring A”.
Highlight some other text that comes before the Substring A in the same paragraph. We will call this text “Substring B”.
Press ` (backtick) once to format Substring B as monospace.
The formatting of Substring A is now shifted 2 symbols left, so that 2 rightmost symbols of it are no longer formatted, and 2 symbols to the left of it are now formatted.
The Expected Behavior
Formatting of Substring A (refer to the “How to reproduce it” section) is expected not to be shifted at all when formatting Substring B using backticks ``.
Additional Context
I’m not completely sure that it is always exactly 2 symbols.
Device
Huawei MateBook B3-440
OS
Windows 10.0.19045
Anytype Version
v0.42.8
Network Mode
AnySync
Technical Information
OS version: win32 x64 10.0.19045
App version: 0.42.8
Build number: build on 2024-09-06 10:41:02 +0000 UTC at #c583602e975eaf2e525ef7f22e4700f8825a6420 (dirty)
Library version: v0.35.7
Anytype Identity: A9mMQe21vcZy9gNQfaXGgMnsACeRWb4em1c831mghzGi66wt
Analytics ID: 0dcb0667-55e9-4d48-9b14-5126a2087efe
Device ID: 12D3KooWLvqx4W57LDZAqpFKzNQBxCFVhYp7ra6FpTJa4PE1i3Vj
Thanks for the correction.
But although your start post is made accurate and lists all the steps to reproduce the issue, I somehow don’t get it.
Points 4 and especially 5 are my problem.
If I select a substring and then press backtick, the selected text becomes overwritten (and that’s normal). I don’t understand why you seemingly have another result.
Look closely after 0:26 in my screen recording: when I format the word “invention” using backticks, all of the following formatting in the same paragraph slides left.
Before: “discovered the possibility” was formatted as monospace.
After: “e discovered the possibili” is formatted as monospace.
The recording goes on to show the same effect multiple times.
OK, now I’ve seen it.
And I already know a way to avoid that. But we really have a bug here.
One could even say there are two or three bugs.
It’s a difference if you select a word by double clicking it (than it selects the space right from it also on my PC) or if you precise mark it with the mouse or keyboard, to avoid the unwanted selection of the space char.
I can’t see your keystrokes or mouse clicks in the screen record, but I suppose you select a word by double clicking it?
– Then I wonder why the space char right from the word becomes also selected on my PC, but not on your PC?
It’s also a difference if you format the substring with backticks or if you use the button in the context menu.
– On a German keyboard there is no separate backtick key, therefore I’m not able to directly do what you did in the same way. I need to do some keypresses more to get the same result. And then there is the difference to the use of the button in the context menu.
I suppose the team needs to have a deeper look what’s going on here!