From cd8fedc183933c3a0f0fdcba5428159154096b94 Mon Sep 17 00:00:00 2001 From: Joseph Adams Date: Wed, 14 Jan 2026 23:53:43 +0100 Subject: [PATCH] Fix Windows hyperlinks for paths with spaces 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. --- src/hyperlink.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hyperlink.rs b/src/hyperlink.rs index f347e384..0a995d59 100644 --- a/src/hyperlink.rs +++ b/src/hyperlink.rs @@ -58,7 +58,7 @@ fn host() -> &'static str { #[cfg(not(unix))] const fn host() -> &'static str { - "" + "/" } #[cfg(test)]