Skip to content

Lossy path normalization breaks QMD_EDITOR_URI for files with spaces #717

@jritzi

Description

@jritzi

This is a repost of #45, which was closed requesting a reproduction on the latest version.

QMD normalizes filenames with hyphens, so files containing spaces or underscores won't work properly with QMD_EDITOR_URI.

Reproduction steps (using qmd 2.5.3 (179d450))

mkdir /tmp/qmd-lossy
cd /tmp/qmd-lossy
echo "file with spaces" > "my file.md"
echo "file with hyphens" > my-file.md
qmd collection add /tmp/qmd-lossy --name qmd-lossy
qmd ls qmd-lossy
# Only one file is shown

export QMD_EDITOR_URI="obsidian://open?file={path}"
# The path substituted in links always uses hyphens even if the original path uses spaces

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions