Closed MauriceChocoSwiss closed 3 months ago
Hey,
would you be interested in adding +
as well? Thats used by sveltekit ( see https://github.com/yyx990803/launch-editor/issues/50#issuecomment-2227992963 ) and https://github.com/sveltejs/vite-plugin-svelte/issues/943
cc @sodatea this would be the "expand allow list" i mentioned, might be a stop-gap solution until you find the time to implement propper escaping.
Why not, I didn't use sveltkit but I think it can be good for sveltkit user.
i wonder if you want \s
or an actual space char in that group
I prefer to use the \s, it cover more cases like tabs, line breaks etc... In case of ^^
is it possible to have line breaks or tabs in a file path on windows? (that file system never fails to impress, just not sure if in a positive way)
I really don't know... You prefer to use only spaces ?
unless they are possible/allowed, i would prefer just space, but maybe @sodatea has a different opinion.
It would be good to get this merged soonish so we can include it in vite 5.5.
According to https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file CR, LF and TABs are not allowed in a file path. So I think a single space character should suffice.
As for other special characters, there seem to be many more to add for compatibility with all the popular filesystem-based routing solutions, but I'll leave that to a later PR.
As for other special characters, there seem to be many more to add for compatibility with all the popular filesystem-based routing solutions, but I'll leave that to a later PR.
yeahh @sodatea it's still an issue on Win11
issue: https://github.com/sveltejs/vite-plugin-svelte/issues/943#issuecomment-2308578599
I don't think banning characters is the solution to this problem. Even if you did find all the characters that are currently used by every system that depends on Vite why prevent some creative new use of valid special characters in the future? This entire feature seems very short sighted.
Updated regex to authorize whitespace in file path.
Many projects has a whitespace in folder name (like me). Many time it doesn't affect anything but here it prevent file to open.
Let me know !