Userland: Prefer _short_string over String::from_utf8_short_string

This user-defined literal is a strictly equivalent but shorter alias to
`String::from_utf8_short_string`.
This commit is contained in:
Lucas CHOLLET 2023-08-07 22:01:45 -04:00 committed by Andreas Kling
commit a5edc9cdfc
Notes: sideshowbarker 2024-07-17 18:13:59 +09:00
7 changed files with 8 additions and 8 deletions

View file

@ -191,7 +191,7 @@ RecursionDecision MarkdownLinkage::visit(Markdown::Text::LinkNode const& link_no
return RecursionDecision::Recurse;
}
if (url.scheme() == "help") {
if (url.host() != String::from_utf8_short_string("man"sv)) {
if (url.host() != "man"_short_string) {
warnln("help:// URL without 'man': {}", href);
m_has_invalid_link = true;
return RecursionDecision::Recurse;