hare

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

commit 3f04b38006d9bc0cdd4355ec299ab3782fca92eb
parent f4233b0faf1cb130e8de409eeb699125ef6d6933
Author: Vlad-Stefan Harbuz <vlad@vladh.net>
Date:   Tue,  9 Apr 2024 21:02:08 +0100

haredoc: fix symbol links

For example, a reference to [[time::date::]] previously pointed to
/time#date, but should point to /time/date.

Signed-off-by: Vlad-Stefan Harbuz <vlad@vladh.net>

Diffstat:
Mcmd/haredoc/doc/html.ha | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmd/haredoc/doc/html.ha b/cmd/haredoc/doc/html.ha @@ -265,7 +265,7 @@ fn html_decl_ref(ctx: *context, ref: ast::ident) (void | error) = { case symkind::SYMBOL => let ipath = strings::join("/", id[..len(id) - 1]...); defer free(ipath); - fmt::fprintf(ctx.out, "<a href='/{}#{}' class='ref'>{}</a>", + fmt::fprintf(ctx.out, "<a href='/{}/{}' class='ref'>{}</a>", ipath, id[len(id) - 1], ident)?; case symkind::ENUM_LOCAL => fmt::fprintf(ctx.out, "<a href='#{}' class='ref'>{}</a>",