diff options
author | binaarinen <53334195+binaarinen@users.noreply.github.com> | 2021-12-19 21:10:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-19 12:10:41 -0800 |
commit | 0610f16f7f684b320325b6c0b501725138d10a52 (patch) | |
tree | a35f19aec4719a84d0b006bbfdc70b17c3c45970 /src/Text/Pandoc/Shared.hs | |
parent | f8f03c2ffca168d5c897febc2a631c2605973699 (diff) | |
download | pandoc-0610f16f7f684b320325b6c0b501725138d10a52.tar.gz |
Add a writer for Markua 0.10 (#7729)
Markua is a markdown variant used by Leanpub.
More information about Markua can be found at https://leanpub.com/markua/read.
Adds a new exported function `writeMarkua` from T.P.Writers.Markdown.
[API change]
Closes #1871.
Co-authored by Tim Wisotzki and Samuel Lemmenmeier.
Diffstat (limited to 'src/Text/Pandoc/Shared.hs')
-rw-r--r-- | src/Text/Pandoc/Shared.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs index eb0b4acbf..50abe6937 100644 --- a/src/Text/Pandoc/Shared.hs +++ b/src/Text/Pandoc/Shared.hs @@ -25,6 +25,7 @@ module Text.Pandoc.Shared ( ordNub, findM, -- * Text processing + inquotes, tshow, elemText, notElemText, @@ -186,6 +187,10 @@ findM p = foldr go (pure Nothing) -- Text processing -- +-- | Wrap double quotes around a Text +inquotes :: T.Text -> T.Text +inquotes txt = T.cons '\"' (T.snoc txt '\"') + tshow :: Show a => a -> T.Text tshow = T.pack . show |