From 90127bba9650593fefbf08877311396c91a0390c Mon Sep 17 00:00:00 2001 From: Rhiannon Morris Date: Fri, 4 Jun 2021 05:35:17 +0200 Subject: [PATCH] add archiphoneme span --- langfilter/Spans.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/langfilter/Spans.hs b/langfilter/Spans.hs index 0690c47..29d722f 100644 --- a/langfilter/Spans.hs +++ b/langfilter/Spans.hs @@ -15,12 +15,14 @@ spans = \case Code attrs txt | Just ('\\', txt') <- Text.uncons txt -> pure $ Code attrs txt' | Just _ <- enclosed '/' '/' txt -> pure $ ipaB txt + | Just txt' <- enclosed '⫽' '⫽' txt -> pure $ ipaA txt' | Just _ <- enclosed '[' ']' txt -> pure $ ipaN txt | Just txt' <- enclosed '{' '}' txt -> lang txt' | Just txt' <- enclosed '!' '!' txt -> pure $ abbr txt' i -> pure i -ipaB, ipaN, abbr :: Text -> Inline +ipaA, ipaB, ipaN, abbr :: Text -> Inline +ipaA = Span (cls ["ipa", "ipa-arch"]) . text' . surround "⫽" ipaB = Span (cls ["ipa", "ipa-broad"]) . text' ipaN = Span (cls ["ipa", "ipa-narrow"]) . text' abbr = Span (cls ["abbr"]) . text' . endash