aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2010-12-20 19:09:01 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2010-12-20 19:09:01 -0800
commit112717de4e5228b0e4a3bc12fd424ed07a262a8f (patch)
tree8120c3f45dcc38648da0caf3d04a84277ddd8319 /src/Text/Pandoc
parent2fe271d1632a070c02174a2478a3960cbcce0dfe (diff)
downloadpandoc-112717de4e5228b0e4a3bc12fd424ed07a262a8f.tar.gz
Renamed 'enclosed' to 'inside'.
This avoids conflict with 'enclosed' in Text.Pandoc.Parsing.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Pretty.hs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Text/Pandoc/Pretty.hs b/src/Text/Pandoc/Pretty.hs
index 458719129..90dbf7684 100644
--- a/src/Text/Pandoc/Pretty.hs
+++ b/src/Text/Pandoc/Pretty.hs
@@ -59,7 +59,7 @@ module Text.Pandoc.Pretty (
, hsep
, vcat
, vsep
- , enclosed
+ , inside
, braces
, brackets
, parens
@@ -334,7 +334,7 @@ blankline :: Doc
blankline = Doc $ singleton BlankLine
-- | Uses the specified string as a prefix for every line of
--- the enclosed document (except the first, if not at the beginning
+-- the inside document (except the first, if not at the beginning
-- of the line).
prefixed :: String -> Doc -> Doc
prefixed pref doc = Doc $ singleton $ Prefixed pref doc
@@ -398,18 +398,18 @@ chop n cs = case break (=='\n') cs of
where len = length xs
-- | Encloses a 'Doc' inside a start and end 'Doc'.
-enclosed :: Doc -> Doc -> Doc -> Doc
-enclosed start end contents =
+inside :: Doc -> Doc -> Doc -> Doc
+inside start end contents =
start <> contents <> end
-- | Puts a 'Doc' in curly braces.
braces :: Doc -> Doc
-braces = enclosed (char '{') (char '}')
+braces = inside (char '{') (char '}')
-- | Puts a 'Doc' in square brackets.
brackets :: Doc -> Doc
-brackets = enclosed (char '[') (char ']')
+brackets = inside (char '[') (char ']')
-- | Puts a 'Doc' in parentheses.
parens :: Doc -> Doc
-parens = enclosed (char '(') (char ')')
+parens = inside (char '(') (char ')')