Skip to content
Myr

Fix Windows hyperlinks for paths with spaces

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Fixes #1843 Changed the host() function for Windows to return '/' instead of '' to generate RFC 3986 compliant file URLs with three slashes. Before: file://C:/test/hi%20there.txt (broken) After: file:///C:/test/hi%20there.txt (works) This fixes hyperlinks failing on Windows when file paths contain spaces or other characters that require percent-encoding.

authored by Joseph Adams · committed by Joseph Adams · parent 5f95a78 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:src/hyperlink.rs+1 added-1 removed
56 unmodified lines
57}5859#[cfg(not(unix))]60const fn host() -> &'static str {61 ""61 "/"62}6364#[cfg(test)]65mod test {
22 unmodified lines