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

🐛 Syntax highlighting doesn't work when the second file path includes a backslash on Windows #1220

Closed
Mixaz017 opened this issue Oct 25, 2022 · 4 comments

Comments

@Mixaz017
Copy link

When passing a path containing backslashes \ as the second argument (PLUS_FILE), the output have no syntax highlighting.
File contents:
image
Expected output (without backslashes):
image
Actual output (with backslashes):
image
git -v: git version 2.38.1.windows.1 (problem still occurs with --no-gitconfig)
delta -V: delta 0.14.0
less -V: less 608 (Spencer V8 regular expressions)

It feels quite odd because this problem doesn't occur when the first file path (MINUS_FILE) contain backslashes, and delta is still reading file contents correctly.
A workaround is to replace backslashes with forward slashes, but it would be nice to be able to use backslashes since that is the "native" path on Windows, and PowerShell auto completion inserts backslashes so users have to manually fix the path.

@dandavison
Copy link
Owner

Thanks @Mixaz017, that certainly looks like a bug.

@th1000s
Copy link
Collaborator

th1000s commented Oct 26, 2022

Should be fixed with #1222 - the git output placed " around the filename because of the backslash, so the extension got parsed as ts" instead of ts.

@Mixaz017
Copy link
Author

Thank you @th1000s , I can confirm that the PR fixes the issue.

@Mixaz017
Copy link
Author

Mixaz017 commented Dec 5, 2022

The issue is gone in 0.15.0! Closing.

@Mixaz017 Mixaz017 closed this as completed Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants