hare

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

commit fa4be88f7902da6f293808c8cb8ef694389de637
parent ba7c293138d8fcaacab30fac8234df8ef4d19e07
Author: Drew DeVault <sir@cmpwn.com>
Date:   Tue, 20 Apr 2021 12:24:23 -0400

haredoc: change path to stdlib refs

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

diff --git a/cmd/haredoc/html.ha b/cmd/haredoc/html.ha @@ -153,20 +153,20 @@ fn htmlref(ctx: *context, ref: ast::ident) (void | io::error) = { ik: (ast::ident, symkind) => ik, }; + // TODO: The reference is not necessarily in the stdlib const kind = ik.1, id = ik.0; const ident = unparse::identstr(id); switch (kind) { symkind::LOCAL => fmt::printf("<a href='#{0}' class='ref'>{0}</a>", ident)?, symkind::MODULE => { - // TODO: Not necessarily in /stdlib let ipath = module::identpath(id); - fmt::printf("<a href='/stdlib/{}' class='ref'>{}</a>", + fmt::printf("<a href='/{}' class='ref'>{}</a>", ipath, ident)?; }, symkind::SYMBOL => { let ipath = module::identpath(id[..len(id) - 1]); - fmt::printf("<a href='/stdlib/{}#{}' class='ref'>{}</a>", + fmt::printf("<a href='/{}#{}' class='ref'>{}</a>", ipath, id[len(id) - 1], ident)?; }, };