Skip to content

Commit e24bb14

Browse files
authored
Merge pull request #580 from jfmengels/simpler-indent
Simplify the Indent.generate function
2 parents bcf8fa0 + fc2ae83 commit e24bb14

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/Graphql/Document/Indent.elm

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,4 @@ module Graphql.Document.Indent exposing (generate)
33

44
generate : Int -> String
55
generate indentationLevel =
6-
spaces (indentationLevel * 2)
7-
8-
9-
spaces : Int -> String
10-
spaces n =
11-
if n > 0 then
12-
" " ++ spaces (n - 1)
13-
14-
else
15-
""
6+
String.repeat indentationLevel " "

0 commit comments

Comments
 (0)