Esc

check_links

procedureextensionexperimentalsince 0.36.1Source
  • macOS: check_links works on macOS
  • Linux: check_links works on Linux
  • Windows: check_links works on Windows
  • Wasm: check_links is not available on Wasm

Reports sorted, unique internal-link problems with the API site's resolution rules. The returned array and its strings belong to the caller; free both when done.

Signature

check_links :: (w: *Writer, resolve := true) -> [..] string
Example
w := writer_init("unused", "/d/", true);
defer deinit(*w);
out: Out;
defer deinit(*out);
html(*out, "<a href=\"/d/\">home</a>");
write_page(*w, "", *out);
problems := check_links(*w);
assert(problems.count == 0);
array_free(problems);

See also