1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:34:59 +00:00

markdown-check: Ignore absolute icon paths

We have no good way to handle these yet, and there's no point in
forcing everyone to skip their pre-commit checks.
This commit is contained in:
Idan Horowitz 2022-01-22 19:31:02 +02:00
parent e37af0b073
commit bb340f1272

View file

@ -167,6 +167,11 @@ RecursionDecision MarkdownLinkage::visit(Markdown::Text::LinkNode const& link_no
outln("Not checking local link {}", href);
return RecursionDecision::Recurse;
}
if (href.starts_with("/res/icons/")) {
// TODO: Resolve relative to $SERENITY_SOURCE_DIR/Base/
outln("Not checking icon link {}", href);
return RecursionDecision::Recurse;
}
String label = StringCollector::from(*link_node.text);
Optional<size_t> last_hash = href.find_last('#');