add archiphoneme span
This commit is contained in:
parent
2c522aa4b0
commit
90127bba96
1 changed files with 3 additions and 1 deletions
|
@ -15,12 +15,14 @@ spans = \case
|
||||||
Code attrs txt
|
Code attrs txt
|
||||||
| Just ('\\', txt') <- Text.uncons txt -> pure $ Code attrs txt'
|
| Just ('\\', txt') <- Text.uncons txt -> pure $ Code attrs txt'
|
||||||
| Just _ <- enclosed '/' '/' txt -> pure $ ipaB txt
|
| Just _ <- enclosed '/' '/' txt -> pure $ ipaB txt
|
||||||
|
| Just txt' <- enclosed '⫽' '⫽' txt -> pure $ ipaA txt'
|
||||||
| Just _ <- enclosed '[' ']' txt -> pure $ ipaN txt
|
| Just _ <- enclosed '[' ']' txt -> pure $ ipaN txt
|
||||||
| Just txt' <- enclosed '{' '}' txt -> lang txt'
|
| Just txt' <- enclosed '{' '}' txt -> lang txt'
|
||||||
| Just txt' <- enclosed '!' '!' txt -> pure $ abbr txt'
|
| Just txt' <- enclosed '!' '!' txt -> pure $ abbr txt'
|
||||||
i -> pure i
|
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'
|
ipaB = Span (cls ["ipa", "ipa-broad"]) . text'
|
||||||
ipaN = Span (cls ["ipa", "ipa-narrow"]) . text'
|
ipaN = Span (cls ["ipa", "ipa-narrow"]) . text'
|
||||||
abbr = Span (cls ["abbr"]) . text' . endash
|
abbr = Span (cls ["abbr"]) . text' . endash
|
||||||
|
|
Loading…
Reference in a new issue