about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2022-12-13 23:42:33 +0100
committerbptato <nincsnevem662@gmail.com>2022-12-13 23:42:33 +0100
commit0f3577949819daa31fbf8cd943d634f49d35c498 (patch)
tree494026b8fd0adc9fa94787dd4ba28b961f5ea992
parente80ae4b136fe82f916868e1e9b728d69c403a70a (diff)
downloadchawan-0f3577949819daa31fbf8cd943d634f49d35c498.tar.gz
doc: fix headers; url: fix a shorten_path bug
-rw-r--r--doc/config.md20
-rw-r--r--src/types/url.nim2
2 files changed, 11 insertions, 11 deletions
diff --git a/doc/config.md b/doc/config.md
index efc60226..95b55f92 100644
--- a/doc/config.md
+++ b/doc/config.md
@@ -21,16 +21,16 @@ configuration.
 
 **Table of contents**
 
-* [start](Start)
-* [external](External)
-* [network](Network)
-* [display](Display)
-* [omnirule](Omnirule)
-* [siteconf](Siteconf)
-* [stylesheets](Stylesheets)
-* [keybindings](Keybindings)
-   * [pager-actions](Pager actions)
-   * [line-editing-actions](Line-editing actions)
+* [Start](#start)
+* [External](#external)
+* [Network](#network)
+* [Display](#display)
+* [Omnirule](#omnirule)
+* [Siteconf](#siteconf)
+* [Stylesheets](#stylesheets)
+* [Keybindings](#keybindings)
+   * [Pager actions](#pager-actions)
+   * [Line-editing actions](#line-editing-actions)
 
 ## Start
 
diff --git a/src/types/url.nim b/src/types/url.nim
index 0b4471e3..f0251fa8 100644
--- a/src/types/url.nim
+++ b/src/types/url.nim
@@ -325,7 +325,7 @@ func isempty(host: Host): bool =
 proc shorten_path(url: Url) {.inline.} =
   assert not url.path.opaque
 
-  if url.scheme == "file" and url.path.ss.len == 1 and url.path.ss[0][0] in Letters and url.path.ss[0][1] == ':':
+  if url.scheme == "file" and url.path.ss.len == 1 and url.path.ss[0].len == 2 and url.path.ss[0][0] in Letters and url.path.ss[0][1] == ':':
     return
   if url.path.ss.len > 0:
     discard url.path.ss.pop()