packages feed

neat-interpolation 0.3.2.6 → 0.4

raw patch · 4 files changed

+10/−6 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

+ CHANGELOG.md view
@@ -0,0 +1,3 @@+## Version 0.4++- Changed the behaviour of the quasi-quoter in regards to trailing whitespace. Before it was always adding newline in the end, now it always completely removes all the trailing whitespace.
library/NeatInterpolation.hs view
@@ -108,7 +108,7 @@ quoteExp input =   case parseLines $ normalizeQQInput input of     Left e -> fail $ show e-    Right lines -> sigE (appE [|T.unlines|] $ listE $ map lineExp lines)+    Right lines -> sigE (appE [|T.intercalate "\n"|] $ listE $ map lineExp lines)                         [t|Text|]  lineExp :: Line -> Q Exp
neat-interpolation.cabal view
@@ -1,5 +1,5 @@ name: neat-interpolation-version: 0.3.2.6+version: 0.4 synopsis: A quasiquoter for neat and simple multiline text interpolation description:   A quasiquoter for producing Text values with support for@@ -16,6 +16,7 @@ bug-reports: https://github.com/nikita-volkov/neat-interpolation/issues build-type: Simple cabal-version: >=1.10+extra-source-files: CHANGELOG.md  source-repository head   type: git
test/Main.hs view
@@ -25,13 +25,13 @@         |]       a = "{\n  indented line\n  indented line\n}"       in assertEqual ""-          "function(){\n  function(){\n    {\n      indented line\n      indented line\n    }\n  }\n  return {\n    indented line\n    indented line\n  }\n}\n"+          "function(){\n  function(){\n    {\n      indented line\n      indented line\n    }\n  }\n  return {\n    indented line\n    indented line\n  }\n}"           (template a a)     ,     testCase "Isolation" $ let       isolated name = [text|this_could_be_${name}_long_identifier|]       in assertEqual ""-          "this_could_be_one_long_identifier\n"+          "this_could_be_one_long_identifier"           (isolated "one")     ,     testCase "Escaping" $ let@@ -48,9 +48,9 @@       a = "{\n  indented line\n  indented line\n}"       in do         assertEqual ""-          "function(){\n  function(){\n    {\n      indented line\n      indented line\n    }\n  }\n  return \"$b\"\n}\n"+          "function(){\n  function(){\n    {\n      indented line\n      indented line\n    }\n  }\n  return \"$b\"\n}"           (template a a)         assertEqual ""-          "this_could_be_$one$_long_identifier\n"+          "this_could_be_$one$_long_identifier"           (escaped "one")   ]