From c91bc9dfb59e39fc0d719ffe9ea6b9beaf58a991 Mon Sep 17 00:00:00 2001 From: jason810496 <810496@email.wlsh.tyc.edu.tw> Date: Sat, 22 Jun 2024 23:37:23 +0800 Subject: [PATCH] fix: handle codeimporter URL encoding --- layouts/shortcodes/codeimporter.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/shortcodes/codeimporter.html b/layouts/shortcodes/codeimporter.html index d461b5bb..952c28a8 100644 --- a/layouts/shortcodes/codeimporter.html +++ b/layouts/shortcodes/codeimporter.html @@ -4,7 +4,7 @@ {{ $startLine = sub $startLine 1 }} {{ $endLine := .Get "endLine" | default -1 | int }} {{ $selectedLines := slice }} -{{ with resources.GetRemote ( printf $url ) }} +{{ with resources.GetRemote (urls.Parse $url) }} {{ $lines := split .Content "\n" }} {{ $totalLine := $lines | len }}