From 85e5cb7ae2cdcc71c831a84a112e05cda4b7ba96 Mon Sep 17 00:00:00 2001 From: Alice BRENON <alice.brenon@ens-lyon.fr> Date: Wed, 17 Jan 2024 09:51:17 +0100 Subject: [PATCH] Explain the ':'-embedded convention for fields with several values --- lib/GEODE/Metadata/Contrastive.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/GEODE/Metadata/Contrastive.hs b/lib/GEODE/Metadata/Contrastive.hs index b044e0c..28f07ef 100644 --- a/lib/GEODE/Metadata/Contrastive.hs +++ b/lib/GEODE/Metadata/Contrastive.hs @@ -13,6 +13,10 @@ import GHC.Generics (Generic) newtype MultiText = MultiText { getList :: [Text] } deriving (Show) +-- | We represent fields with multiple values by ':'-surrounded values +-- (including a leading and trailing ':') to be able to always write the same +-- regex to match for their value (/.*:Géographie:.*/, no matter if it occurs at +-- the begining, the end or in the middle of the field formatList :: MultiText -> Text formatList = colonFormat . getList where -- GitLab