about summary refs log tree commit diff
path: root/src/etc/htmldocck.py
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2024-11-22 12:58:20 -0700
committerMichael Howell <michael@notriddle.com>2025-08-15 10:26:03 -0700
commit8511e40e7294e1efcc64b81d43969b6bf0f14c2d (patch)
tree13e479663d548c96addeac600e985476e258eae7 /src/etc/htmldocck.py
parentc018ae5389c49cc4bcb8343d80dd8e7323325410 (diff)
downloadrust-8511e40e7294e1efcc64b81d43969b6bf0f14c2d.tar.gz
rust-8511e40e7294e1efcc64b81d43969b6bf0f14c2d.zip
rustdoc-search: search backend with partitioned suffix tree
Diffstat (limited to 'src/etc/htmldocck.py')
-rwxr-xr-xsrc/etc/htmldocck.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/etc/htmldocck.py b/src/etc/htmldocck.py
index 72975cc6206..8d7f7341c2e 100755
--- a/src/etc/htmldocck.py
+++ b/src/etc/htmldocck.py
@@ -15,6 +15,7 @@ import os.path
 import re
 import shlex
 from collections import namedtuple
+from pathlib import Path
 
 try:
     from html.parser import HTMLParser
@@ -242,6 +243,11 @@ class CachedFiles(object):
             return self.last_path
 
     def get_absolute_path(self, path):
+        if "*" in path:
+            paths = list(Path(self.root).glob(path))
+            if len(paths) != 1:
+                raise FailedCheck("glob path does not resolve to one file")
+            path = str(paths[0])
         return os.path.join(self.root, path)
 
     def get_file(self, path):