git.iko.soy/typeable/pandoc
on master help sign in
Renamed 'enclosed' to 'inside'.
112717dJohn MacFarlane
src/Text/Pandoc/Pretty.hs+7−7
@@ -59,7 +59,7 @@ module Text.Pandoc.Pretty (
59 , hsep
59 , hsep
60 , vcat
60 , vcat
61 , vsep
61 , vsep
62− , enclosed
62+ , inside
63 , braces
63 , braces
64 , brackets
64 , brackets
65 , parens
65 , parens
@@ -334,7 +334,7 @@ blankline :: Doc
334blankline = Doc $ singleton BlankLine
334blankline = Doc $ singleton BlankLine
335
335
336-- | Uses the specified string as a prefix for every line of
336-- | Uses the specified string as a prefix for every line of
337−-- the enclosed document (except the first, if not at the beginning
337+-- the inside document (except the first, if not at the beginning
338-- of the line).
338-- of the line).
339prefixed :: String -> Doc -> Doc
339prefixed :: String -> Doc -> Doc
340prefixed pref doc = Doc $ singleton $ Prefixed pref doc
340prefixed pref doc = Doc $ singleton $ Prefixed pref doc
@@ -398,18 +398,18 @@ chop n cs = case break (=='\n') cs of
398 where len = length xs
398 where len = length xs
399
399
400-- | Encloses a 'Doc' inside a start and end 'Doc'.
400-- | Encloses a 'Doc' inside a start and end 'Doc'.
401−enclosed :: Doc -> Doc -> Doc -> Doc
401+inside :: Doc -> Doc -> Doc -> Doc
402−enclosed start end contents =
402+inside start end contents =
403 start <> contents <> end
403 start <> contents <> end
404
404
405-- | Puts a 'Doc' in curly braces.
405-- | Puts a 'Doc' in curly braces.
406braces :: Doc -> Doc
406braces :: Doc -> Doc
407−braces = enclosed (char '{') (char '}')
407+braces = inside (char '{') (char '}')
408
408
409-- | Puts a 'Doc' in square brackets.
409-- | Puts a 'Doc' in square brackets.
410brackets :: Doc -> Doc
410brackets :: Doc -> Doc
411−brackets = enclosed (char '[') (char ']')
411+brackets = inside (char '[') (char ']')
412
412
413-- | Puts a 'Doc' in parentheses.
413-- | Puts a 'Doc' in parentheses.
414parens :: Doc -> Doc
414parens :: Doc -> Doc
415−parens = enclosed (char '(') (char ')')
415+parens = inside (char '(') (char ')')