Code enclosed in backticks does not preserve double/consecutive spaces

Code enclosed in backticks “``” does not preserve double/consecutive spaces.

Steps to reproduce

for example
[`\\\path\to\stupid Directory name`](file://///
renders as
\\\path\to\stupid Directory name
i.e. double space between “d” and “D” is changed to single space.

Note: I see the same bug here on forum in Google Chrome so do not be confused if original link text does not show double space, just add it when trying to reproduce the problem.

Expected result

\\\path\to\stupid··Directory name
Note: Here I changed spaces to another symbol to achieve correct rendering on forum.

Actual result

\\\path\to\stupid Directory name


  • Operating system: windows 7
  • Obsidian version: 0.9.20 (observed already in many previous versions)

This happens everywhere. Including VSCode.

Thank you for the tool. This helped me to find solution that preserves consecutive spaces. Use html “pre” tag instead of backticks in link text. That preserves consecutive spaces but does not preserve backslash before underscore (reported here).
The solution with backticks on the other hand preserves backslash before underscore but does not preserve consecutive whitespace.
So the issue is solved as long as both issues do not occur together in the same path.