Skip to content

Commit

Permalink
feat: Add strshow to Veneer.hs
Browse files Browse the repository at this point in the history
  • Loading branch information
414owen committed Nov 12, 2023
1 parent 955f613 commit 313d26a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Text/Pandoc/Builder/Monadic/Veneer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@ module Text.Pandoc.Builder.Monadic.Veneer
, h4
, h5
, tableWithColspec
, strshow
) where

import Text.Pandoc.Builder.Monadic.Verbatim
( Builder, Inline, Block(..), ColSpec, header, simpleTable
, divWith, spanWith, nullAttr
( Builder, Inline(..), Block(..), ColSpec, header, simpleTable
, divWith, spanWith, nullAttr, str
)
import Text.Pandoc.Builder.Monadic.Utils

import qualified Data.Text as T

-- | Build a level 1 header.
h1 :: Builder Inline -> Builder Block
h1 = header 1
Expand Down Expand Up @@ -63,3 +66,7 @@ div' = divWith nullAttr
-- This would be named 'span', but that clashes with prelude's 'span'.
span' :: Builder Inline -> Builder Inline
span' = spanWith nullAttr

-- | Build a v'Str' using a values's `Show` instance.
strshow :: Show a => a -> Builder Inline
strshow = str . T.pack . show

0 comments on commit 313d26a

Please sign in to comment.