"Insert Upload Tag" paths normalization needed
See original GitHub issueIssue Description
Summary of issue
The menu command listed as “Insert Upload Tag” will insert into my markdown document a relative path with backslashes. This is wrong.
For example You would expect <uploads_baseurl>/uploads/image.png
as the output when selecting image.png
for upload. However on windows, the output is <uploads_baseurl>/uploads\image.png
Thus, paths normalization is needed.
System details
-
System Platform? Windows 7 in my case
-
Sublime Version? Problem should exist in any Sublime version but I happen to be running v3208
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
How to import a normalized path requiring "path"?
I want to use "path", but I can't use it prior to imports. import React from 'react'; import ReactDOM from 'react- ...
Read more >Configuring Import Profiles for Primo VE
Select Add New Profile to open the Import Profile Details page. ... Normalization pattern - If you need to extract parts of the...
Read more >Our counterintuitive fix for Android path normalization - Dropbox
Normalized paths are file or folder paths that have been converted to a standard form that's operating-system agnostic. For example, we would ......
Read more >Node.js path.normalize() Method - W3Schools
normalize () method resolves the specified path, fixing '..','\\\\' etc. Syntax. path.normalize(path);. Parameter Values. Parameter, Description. path, Required.
Read more >Path - Akamai TechDocs
Normalize path : Select this option to automatically modify the string that identifies a path or file so that it conforms to a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If the above is correct, we will need to look at line 1202.
We could potentially do this using
posixpath.relpath
instead so that we always return forward slashes regardless of OS…@aklef I don’t actually use this feature (nor did I code it), so maybe you can help me understand it. I find a file that I want to link to in my markdown, and when I add it to my markdown, I always want it to use POSIX format (vs. Windows format) so that it conforms to web standards? Right now, the
relative_path
feature is returning theos.sep
for Windows which messes up the web path.