hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 138916299ef60d413ed6fa22b4ddcfd6f0d53ac9
parent 857f2695156a08971b0f6ccb0dd21082490a488b
Author: Pierre Curto <pierre.curto@gmail.com>
Date:   Thu, 17 Nov 2022 17:36:35 +0100

haredoc: make submodules reference relative

This helps when viewing documentation directly instead of served over HTTP.

Signed-off-by: Pierre Curto <pierre.curto@gmail.com>

Diffstat:
Mcmd/haredoc/html.ha | 6++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/cmd/haredoc/html.ha b/cmd/haredoc/html.ha @@ -133,12 +133,10 @@ fn emit_html(ctx: *context) (void | error) = { }; fmt::fprintln(ctx.out, "<ul class='submodules'>")?; for (let i = 0z; i < len(submodules); i += 1) { - let submodule = submodules[i]; - let path = path::join("/", identpath, submodule); - defer free(path); + const submodule = submodules[i]; fmt::fprintf(ctx.out, "<li><a href='")?; - html_escape(ctx.out, path)?; + html_escape(ctx.out, submodule)?; fmt::fprintf(ctx.out, "'>")?; html_escape(ctx.out, submodule)?; fmt::fprintfln(ctx.out, "</a></li>")?;