QOL improvements to docsearch: alphabetize, filter out unittests

This commit is contained in:
2026-01-14 16:35:54 -05:00
parent 264dd5e8be
commit 8a33a399d1
7 changed files with 111 additions and 34 deletions

View File

@@ -143,7 +143,7 @@ bool contains_newline(std::string_view s) {
bool words_separated_by_dashes(string_view v) {
while (true) {
string_view word = sv::read_ascii_identifier(v);
string_view word = sv::read_simple_identifier(v);
if (word.empty()) return false;
if (v.empty()) return true;
char c = v.front();
@@ -156,12 +156,12 @@ bool words_separated_by_dashes(string_view v) {
// registered, obviously. It only checks that it's in
// the desired notation.
bool valid_mime_type(string_view method) {
string_view part1 = sv::read_ascii_identifier(method);
string_view part1 = sv::read_simple_identifier(method);
if (part1.empty()) return false;
if (sv::zfront(method) != '/') return false;
method.remove_prefix(1);
while (true) {
string_view word = sv::read_ascii_identifier(method);
string_view word = sv::read_simple_identifier(method);
if (word.empty()) return false;
if (method.empty()) return true;
char c = method.front();