@@ -142,7 +142,7 @@ template = mconcat <$> P.many (P.choice [ lift chunk
142 , lift escaped
142 , lift escaped
143 , conditional
143 , conditional
145− , lift partial
145+ , partial
146 , lift expr
146 , lift expr
148 where lift = fmap (Template . (:[]))
148 where lift = fmap (Template . (:[]))
@@ -246,12 +246,18 @@ for = P.try $ do
248--------------------------------------------------------------------------------
248--------------------------------------------------------------------------------
249−partial :: P.Parser TemplateElement
249+partial :: P.Parser Template
250partial = P.try $ do
250partial = P.try $ do
251+ trimLPartial <- trimOpen
251− void $ P.string "$partial("
252+ void $ P.string "partial("
252 e <- expr'
253 e <- expr'
253− void $ P.string ")$"
254+ void $ P.char ')'
255+ trimRPartial <- trimClose
257+ pure $ Template $ mconcat [ [TrimL | trimLPartial]
254− return $ Partial e
258+ , [Partial e]
259+ , [TrimR | trimRPartial]
257--------------------------------------------------------------------------------
263--------------------------------------------------------------------------------