packages feed

haiji 0.2.2.0 → 0.2.2.2

raw patch · 2 files changed

+8/−2 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

haiji.cabal view
@@ -2,7 +2,7 @@ --  see http://haskell.org/cabal/users-guide/  name:                haiji-version:             0.2.2.0+version:             0.2.2.2 synopsis:            A typed template engine, subset of jinja2 description:         Haiji is a template engine which is subset of jinja2.                      This is designed to free from the unintended rendering result
src/Text/Haiji/Syntax/AST.hs view
@@ -17,6 +17,7 @@ import Data.Attoparsec.Text import Data.Char import Data.Maybe+import Data.Monoid import qualified Data.Text as T #if MIN_VERSION_base(4,9,0) import Data.Kind@@ -158,8 +159,12 @@ -- -- >>> let eval = left (const "parse error") . parseOnly (evalHaijiParser literal) -- >>> eval "テスト{test"+-- Right テスト{test+-- >>> eval "テスト{{test" -- Right テスト -- >>> eval "   テスト  {test"+-- Right    テスト  {test+-- >>> eval "   テスト  {{test" -- Right    テスト -- >>> eval "   テスト  {%-test" -- Right    テスト@@ -173,7 +178,8 @@     pc <- peekChar     case pc of       Nothing  -> if T.null sp then fail "literal" else return sp-      Just '{' -> fail "literal"+      Just '{' -> do x <- try $ sequence [char '{', satisfy (\c -> c `notElem` ("{%" :: String))]+                     T.append (sp <> T.pack x) <$> takeWhile1 (\c -> c /= '{' && not (isSpace c))       _        -> T.append sp <$> takeWhile1 (\c -> c /= '{' && not (isSpace c))  -- |