From 46b863fa36db5396d1816aa8fa43aee190e824cd Mon Sep 17 00:00:00 2001 From: John Wiseman Date: Wed, 20 May 2020 15:04:02 -0700 Subject: [PATCH] Replace - with _ in hashtags. --- src/main/lemondronor/advisorycircular.cljs | 2 +- src/main/lemondronor/advisorycircular/generation.cljc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/lemondronor/advisorycircular.cljs b/src/main/lemondronor/advisorycircular.cljs index d0ccb95..794471f 100644 --- a/src/main/lemondronor/advisorycircular.cljs +++ b/src/main/lemondronor/advisorycircular.cljs @@ -324,7 +324,7 @@ ;; Landmark. "?:[{nearbydistance} miles from {nearbylandmark} ]" ;; Hashtag based on registration. - "?:[#{registration} |#{militaryregistration} ]" + "?:[#{registration|hashtag} |#{militaryregistration|hashtag} ]" ;; tar1090 link. "https://tar1090.adsbexchange.com/?icao={icao}&zoom=13")])) diff --git a/src/main/lemondronor/advisorycircular/generation.cljc b/src/main/lemondronor/advisorycircular/generation.cljc index a0cc0c9..f7adbda 100644 --- a/src/main/lemondronor/advisorycircular/generation.cljc +++ b/src/main/lemondronor/advisorycircular/generation.cljc @@ -63,7 +63,8 @@ (if (re-find #"^[FHLMNRSX](\b|[A-Z0-9])" s) (str "an " s) (str "a " s)) - (str "an " s)))}) + (str "an " s))) + :hashtag #(string-replace % #"-" "_")}) (defn apply-filter [s filter-name]