Closed veksha closed 9 months ago
and i think it will solve https://github.com/errata-ai/vale-ls/issues/6 issue too. (because to_file_path
will not do percent-encoding)
also to_file_path
should be checked for errors, it can fail on urls like file:///Untitled1
.
Thanks for looking into this.
I can confirm that it fixes #6, but I can't test on Windows at the moment.
@jdkato, tested your commit on Windows. works fine.
for new tabs which were not yet saved to files it outputs File path error: Some(())
, but continues to work for other tabs.
I'll make the log message more clear in the next release.
uri.path()
will return/C:/file.txt
on windows and call to vale.exe will fail.uri.path()
is returning uri component called "path" (not what we want), i think it's better to useuri.to_file_path()
to get file path in correct format.