Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE: Eliminate backslashes used for filepath #1406

Open
1 task done
pysan3 opened this issue Apr 25, 2024 · 0 comments
Open
1 task done

FEATURE: Eliminate backslashes used for filepath #1406

pysan3 opened this issue Apr 25, 2024 · 0 comments
Labels
feature Issues related to feature proposals. Please attach a module.

Comments

@pysan3
Copy link
Contributor

pysan3 commented Apr 25, 2024

Issues

  • I have checked existing issues and there are no existing ones with the same request.

Feature description

Assigned to me (@pysan3).

Original discussion at Discord - #norg-specification.

AFAIK the file link syntax for norg file and arbitrary filepath do not restrict the path delimiter. So {:foo\bar:}, {/ .\foo\bar.txt} are valid. Even worse, {:$\file:} is also valid?

Shall we straight up ban backslashes in these links and only allow forward slashes just like the uri spec?

The ambiguity we have now is problematic when doing grep to search for backlinks etc.

As this is a pretty easy thing to flip thanks to Pathlib, maybe we should start by always returning forward slash for completion (core.integrations.nvim-cmp).
path:tostring("/") <- you can specify the delimiter with the second argument to tostring.

This might be a bit off topic but I’d like to see .image $/img/path/rel/to/workspace.png and extend this trend to other macros as well (like tangle?).

Help

Yes

Implementation help

No response

@pysan3 pysan3 added the feature Issues related to feature proposals. Please attach a module. label Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Issues related to feature proposals. Please attach a module.
Projects
None yet
Development

No branches or pull requests

1 participant