question-mark

Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Insert Upload Tag" paths normalization needed

See original GitHub issue

Issue 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:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
23maverick23commented, Sep 23, 2019

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…

1reaction
23maverick23commented, Sep 23, 2019

@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 the os.sep for Windows which messes up the web path.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found