From a10f4c93f74b26781fe170f0f117cd506149e738 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 21 Jan 2021 12:58:33 -0800 Subject: add permalink icon/link --- fatcat_scholar/search.py | 2 ++ fatcat_scholar/templates/search_macros.html | 6 ++++++ 2 files changed, 8 insertions(+) (limited to 'fatcat_scholar') diff --git a/fatcat_scholar/search.py b/fatcat_scholar/search.py index cbfc465..600745f 100644 --- a/fatcat_scholar/search.py +++ b/fatcat_scholar/search.py @@ -224,6 +224,8 @@ def process_query(query: FulltextQuery) -> FulltextHits: pmcid = clean_pmcid(query.q) if pmcid: return do_lookup_query(f'pmcid:"{pmcid}"') + if query.q.strip().startswith("key:"): + return do_lookup_query(query.q) # if this is a citation string, do a fuzzy lookup if settings.ENABLE_CITATION_QUERY and sniff_citation_query(query.q): diff --git a/fatcat_scholar/templates/search_macros.html b/fatcat_scholar/templates/search_macros.html index ca6d9f5..3ef5174 100644 --- a/fatcat_scholar/templates/search_macros.html +++ b/fatcat_scholar/templates/search_macros.html @@ -488,6 +488,12 @@ + + + + -- cgit v1.2.3