@@ -59,6 +59,8 @@ module Text.Pandoc.Pretty (
@@ -393,3 +395,10 @@ chop n cs = case break (=='\n') cs of
393 else take n xs : chop n (drop n xs ++ ys)
395 else take n xs : chop n (drop n xs ++ ys)
394 where len = length xs
396 where len = length xs
398+-- | Puts a 'Doc' in curly braces.
400+braces d = char '{' <> d <> char '}'
402+-- | Puts a 'Doc' in square brackets.
403+brackets :: Doc -> Doc
404+brackets d = char '[' <> d <> char ']'