doctemplates 0.6 → 0.6.1
raw patch · 5 files changed
+15/−5 lines, 5 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- changelog.md +4/−0
- doctemplates.cabal +1/−1
- src/Text/DocTemplates/Parser.hs +5/−1
- test/boilerplate.txt +2/−1
- test/partials.test +3/−2
changelog.md view
@@ -1,5 +1,9 @@ # doctemplates +## 0.6.1++ * Indent bare partials.+ ## 0.6 * Add `+nest`/`-nest` keywords.
doctemplates.cabal view
@@ -1,5 +1,5 @@ name: doctemplates-version: 0.6+version: 0.6.1 synopsis: Pandoc-style document templates description: This is the text templating system used by pandoc. It supports variable interpolation, iteration,
src/Text/DocTemplates/Parser.hs view
@@ -250,6 +250,7 @@ pBarePartial :: TemplateMonad m => Parser m Template pBarePartial = do+ pos <- P.getPosition (closer, fp) <- P.try $ do closer <- pOpen P.skipMany pSpaceOrTab@@ -258,7 +259,10 @@ res <- pPartial Nothing fp P.skipMany pSpaceOrTab closer- return res+ let toNested = case P.sourceColumn pos - 1 of+ 0 -> id+ i -> Nested i+ return $ toNested res pPartialName :: TemplateMonad m => Parser m FilePath
test/boilerplate.txt view
@@ -1,1 +1,2 @@-BOILERPLATE HERE+BOILERPLATE+HERE
test/partials.test view
@@ -17,7 +17,7 @@ $employee:name.tex()[; ]$ -$boilerplate()$+ $boilerplate()$ . (John) Doe (Omar) Smith@@ -29,4 +29,5 @@ \name{John}{Doe}; \name{Omar}{Smith}; \name{Sara}{Chen} -BOILERPLATE HERE+ BOILERPLATE+ HERE