Recognize .zst-compressed man pages + fix SQL basename_from_filename() to recognize .xz

Also greatly simplified basename_from_filename() because apparently I
couldn't write regexes back then.

(And the removed REFERENCES line is to sync schema.sql with the actual
state of the DB, which doesn't have that constraint for some reason.
I'll prolly fix that later)
This commit is contained in:
Yorhel 2021-12-13 18:16:14 +01:00
parent d8b60a251a
commit 7648603685
2 changed files with 6 additions and 17 deletions

View file

@ -27,7 +27,7 @@ pub fn parse_path(path: &str) -> Option<(&str, &str, &str)> {
/man[a-z0-9]/ # Subdir
([^/]+?) # Man page name (non-greedy)
\. ([^/\.]+) # Section
(?: \. (?: gz|lzma|bz2|xz ))* $ # Any number of compression extensions
(?: \. (?: gz|lzma|bz2|xz|zst ))* $ # Any number of compression extensions
").unwrap();
}