Filename / Title does not show multiple whitespaces in some parts of the UI

Steps to reproduce

  1. Create new note. Title it three spaces.
  2. See the three spaces in the note title area.
  3. Do not see the three spaces in the file tree area on the left (which is fine).
  4. Right-click on the note in the file tree and select Reveal in Finder (on Mac).
  5. Observe in Finder that the file name is three spaces.md.
  6. Right-click on the note in the file tree and select Rename....
  7. Observe that the note name is not displayed with multiple spaces.
  8. Copy the note name text and paste it somewhere (like into the note in a code block).
  9. Observe that the multiple spaces have been collapsed.

Did you follow the troubleshooting guide? [Y/N]

Yes. Reproduced in sandbox.

Expected result

The note name text should match the filename text.
It is okay to Markdown format it for display, but when it is copied and pasted, the original text should be preserved.

The text shown in the Rename... field should show the multiple spaces (matching the actual file name), and copying the field text should preserve the multiple spaces.

The note title field should only show the multiple spaces when it is being edited.

Actual result

The note name text that was copied had extra spaces removed, and it no longer matched the file name.

The note name in the note title area is displayed with multiple spaces, yet when copied, the resulting pasted text also has the extra spaces removed.

Environment

SYSTEM INFO:
Obsidian version: v1.5.12
Installer version: v1.5.8
Operating system: Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:37 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6031 23.4.0
Login status: not logged in
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

This screenshot shows my test:

Why is this important? For me, as a relatively new Obsidian user, I’m porting notes over from Evernote. I want to name my attachments folders to match the note files so when I move them around in Obsidian the attachments stay near the notes (thanks to the Automatically rename attachment folder feature of the Custom Attachment Location plugin).

When notes are imported from Evernote, the note name does not match the attachment folder name. I have been using Rename... to copy the note name and paste it into the corresponding attachment folder name. However, some notes failed to be associated with their attachments even after I copied the name from the note to the folder. Eventually I discovered this was the reason.

I believe the principle of least surprise would dictate that a) what you see is what gets copied, and b) when you copy the name of a note from the file tree and paste it to the name of the attachment folder, the file and folder names on disk should match.

thanks

will be changed in 1.6.3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.