summaryrefslogtreecommitdiff
path: root/src/Language/GraphQL/TH.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Language/GraphQL/TH.hs')
-rw-r--r--src/Language/GraphQL/TH.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Language/GraphQL/TH.hs b/src/Language/GraphQL/TH.hs
index b6bc18c..8e1fcb3 100644
--- a/src/Language/GraphQL/TH.hs
+++ b/src/Language/GraphQL/TH.hs
@@ -21,7 +21,7 @@ stripIndentation code = reverse
indent count (' ' : xs) = indent (count - 1) xs
indent _ xs = xs
withoutLeadingNewlines = dropNewlines code
- dropNewlines = dropWhile (== '\n')
+ dropNewlines = dropWhile $ flip any ['\n', '\r'] . (==)
spaces = length $ takeWhile (== ' ') withoutLeadingNewlines
-- | Removes leading and trailing newlines. Indentation of the first line is