diff --git a/doc/GUIDE.org b/doc/GUIDE.org index 491fcac1..c672308a 100644 --- a/doc/GUIDE.org +++ b/doc/GUIDE.org @@ -67,6 +67,7 @@ Searches in visits and their contexts. You can toggle search via: - hotkey: =Ctrl+Shift+H/Ctrl+Alt+H= (Chrome/Firefox correspondingly) - Promnesia context menu - sidebar button +- search just for a =#tag= ** 'search around' Shows you browsing history 'around' another visit, useful to remember how/why did you get on the page. diff --git a/src/promnesia/server.py b/src/promnesia/server.py index d7ca22c6..04978584 100644 --- a/src/promnesia/server.py +++ b/src/promnesia/server.py @@ -162,8 +162,10 @@ def search_common(url: str, where): config = EnvConfig.get() logger.info('url: %s', url) - original_url = url - url = canonify(url) + original_url = url and url.strip() + url = canonify(original_url) + if not url: # Don't eliminate a "#tag" query. + url = original_url logger.info('normalised url: %s', url) visits0: List[Any] = [] diff --git a/src/promnesia/sources/hypothesis.py b/src/promnesia/sources/hypothesis.py index 97ae057d..08eda054 100644 --- a/src/promnesia/sources/hypothesis.py +++ b/src/promnesia/sources/hypothesis.py @@ -13,11 +13,14 @@ def index() -> Results: continue hl = h.highlight ann = h.annotation + tags = h.tags cparts = [] if hl is not None: cparts.append(hl) if ann is not None: cparts.extend(['comment: ' + ann]) + if tags: + cparts.append(" ".join(f"#{t}" for t in tags)) yield Visit( url=h.url, dt=h.created,