add <dfn> markup
This commit is contained in:
parent
99f4d7eac0
commit
3cd2c59be2
1 changed files with 2 additions and 0 deletions
|
@ -21,6 +21,7 @@ spans = \case
|
||||||
| 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'
|
||||||
| Just txt' <- enclosed "*" "*" txt -> pure $ mark txt'
|
| Just txt' <- enclosed "*" "*" txt -> pure $ mark txt'
|
||||||
|
| Just txt' <- enclosed "@" "@" txt -> pure $ dfn txt'
|
||||||
i -> pure i
|
i -> pure i
|
||||||
|
|
||||||
ipaA, ipaB, ipaN, abbr, mark :: Text -> Inline
|
ipaA, ipaB, ipaN, abbr, mark :: Text -> Inline
|
||||||
|
@ -29,6 +30,7 @@ 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
|
||||||
mark txt = RawInline "html" $ "<mark>" <> txt <> "</mark>"
|
mark txt = RawInline "html" $ "<mark>" <> txt <> "</mark>"
|
||||||
|
dfn txt = RawInline "html" $ "<dfn>" <> txt <> "</dfn>"
|
||||||
|
|
||||||
surround :: Text -> Text -> Text
|
surround :: Text -> Text -> Text
|
||||||
surround s txt = s <> txt <> s
|
surround s txt = s <> txt <> s
|
||||||
|
|
Loading…
Reference in a new issue