Something is wrong when pasting the XML into the code block.
Steps to reproduce
Here is my piece of code which i copy from IDE (IntelliJ)
file settings
And paste this into a block of code
Expected result
When pasted into any text editor
be it notepad
or Sublime Text
It looks great
Actual result
But when I paste this into a code block in Obsidian I get this
I can bring it all back to normal by removing extra spaces and adding line breaks
Also, the text is pasted normally if I first paste it into a regular text editor (Notepad, Sublime Text), and then copy it from there and paste it into obsidian
Everything also works fine if I open this file not in IntelliJ, but through a text editor. It displays normally and is copied and pasted into Obsidian normally.
It seems that the problem is on the side of the IntelliJ, maybe he adds some metadata there or something like that IDK, but the fact is that text is inserted into any text editor normally, but not into Obsidian
Environment
-
Operating system:
Windows 11 Pro
22H2
22621.755
Windows Feature Experience Pack 1000.22636.1000.0 -
Debug info:
Obsidian 1.1.16
IntelliJ IDEA 2022.1.4