From 369502bbb4b15dd8636ecd1af1096c3f802ead0e Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 22 Dec 2010 00:22:28 -0800 Subject: Pretty: Added quote, doubleQuote. --- src/Text/Pandoc/Pretty.hs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/Pretty.hs b/src/Text/Pandoc/Pretty.hs index c6ba6fb01..54d65af6f 100644 --- a/src/Text/Pandoc/Pretty.hs +++ b/src/Text/Pandoc/Pretty.hs @@ -63,6 +63,8 @@ module Text.Pandoc.Pretty ( , braces , brackets , parens + , quotes + , doubleQuotes ) where @@ -417,3 +419,11 @@ brackets = inside (char '[') (char ']') -- | Puts a 'Doc' in parentheses. parens :: Doc -> Doc parens = inside (char '(') (char ')') + +-- | Wraps a 'Doc' in single quotes. +quotes :: Doc -> Doc +quotes = inside (char '\'') (char '\'') + +-- | Wraps a 'Doc' in double quotes. +doubleQuotes :: Doc -> Doc +doubleQuotes = inside (char '"') (char '"') -- cgit v1.2.3