Steps to reproduce
Copying terminal output from zsh into code fence on small window causes rendered text to be extremely long.
Using fresh install of Kali Linux (machine image here) with
zsh installed by default.
Initially I thought that newlines were being inserted into the code fence - but it seems specific characters from zsh terminal output cause the code fence to be ‘stretched’ when the window is small.
E.g. with this terminal output:
┌──(kali㉿kali)-[~] └─$ mkdir example ┌──(kali㉿kali)-[~] └─$ cd example
On a large window the output looks normal:
On a smaller window (half size window, with panes split vertically):
- Operating system: Kali Linux 2021.2
- Obsidian version: v0.12.12
There are 26 ‘newlines’ in the ‘unexpected’ output.
I don’t think they are actually newline characters - when text is pasted into another text editor e.g. notepad the text inbetween the terminal commands appears to be several tab-like characters (i.e. for indentation of text).
I suspect this is something to do with how code fences render these specific characters.
This issue doesn’t occur when copying from a regular bash terminal.
This photo shows how the characters are rendered when highlighted:
The characters can be deleted, but it’s cumbersome to do so as the pane scrolls to the right when the text is highlighted.