Changelog History
Page 1
-
v0.8.2 Changes
Add filters: first, rest, last, allbutlast.
New constructors for Filter: FirstItem, LastItem, Rest, AllButLast [API change].
-
v0.8.1 Changes
- Depend on doclayout 0.3, which adds an additional method on the HasChars class. This fixes some stack overflows in rendering very long lines.
-
v0.8 Changes
- Change
Filter
data type toPipe
. Use the nomenclature of "pipe" instead of "filter" to avoid confusion in pandoc between two notions of filter. Otherwise everything works the same.
- Change
-
v0.7.2 Changes
Add
nowrap
filter.Improve
alpha
,roman
,uppercase
,lowercase
filters so they apply recursively within a list or map.Allow
for
loops to bind map value. In this case there is no iteration, but the anophoric variable 'it' is assigned, which may help in using filters that destructure a string into a map (if we add any).
-
v0.7.1 Changes
Add
chomp
filter.Allow filters to be applied to output of partials.
-
v0.7 Changes
Add haddock Makefile target, which regenerates haddocks from README and tests the code example.
Remove
BreakingSpace
constructor onTemplate
. Now we use doclayoutBreakingSpace
inside aLiteral
.Add instance for
ToContext a (Doc a)
.Get benchmarks compiling again.
Use (doclayout)
Doc
internally and for rendered output.TemplateTarget
is now a type constraint synonym, not a regular typeclass.- Constraint on
compileTemplate
andapplyTemplate
simplified using TemplateTarget. - DocTemplates reexports Text.DocLayout.Doc.
- The
Literal
costructor ofTemplate
now takes aDoc a
rather than ana
. - The
SimpleVal
constructor ofVal
now takes aDoc a
rather than ana
. renderTemplate
now returns aDoc a
rather than ana
. (This value can be converted to an a usingrender Nothing
.)
Remove fromText from
TemplateTarget
. Now we usefromString
from Data.String.Parameterize
Template
on underlying stringlike type.Improved behavior of partials.
Improve indent functions: don't drop final newline.
Allow blank lines in nested section.
Indent for Text/String: don't indent empty lines.
Additional tests and documentation about nesting.
Render items in for loop before separator. Otherwise we throw off column calculation.
Remove
+-reflow
; replace with toggle$~$
.Remove pNewline parser; it isn't needed now.
Remove
+-nest
.Fix nest parsing bug.
Improve nesting.
- Change
Nested
constructor forTemplate
so it doesn't take a parameter. - Nesting level is now determined dynamically at render time rather than at compile time. This gives much better results when nesting occurs after template directives. Benchmarks show a slight penalty in performance (from 3.5ms to 3.1ms in rendering), but it's not too much.
- Change
Add filters. Filters transform the value of a variable, e.g. changing a map into an array of key/value pairs. Closes #5.
- Internal: Add
Filter
type and[Filter]
parameter onVariable
. - Remove
unVariable
; now we havevarParts
andvarFilters
. - Document filters in README.md.
- Implement filters.
- Add tests.
- Internal: Add
Add
ToYAML
,FromYAML
instances forContext
,Val
.
-
v0.6.2 Changes
Remove unnecessary
TemplateTarget
constraints onToContext
instances.Add
ToContext
instance forMap Text a
.Add
Data
,Typeable
instances forContext
andVal
.
-
v0.6.1 Changes
- Indent bare partials.
-
v0.6 Changes
Add
+nest
/-nest
keywords.Add
+reflow
/-reflow
keywords.Add Nested constructor to Template, remove Indented and Indented parameter for Interpolate.
More expansive description of library.
-
v0.5.1 Changes
Add elseif keyword.
Improve compile error source locations with partials.
Handle templates that don't end in newlines. Previously this caused problems in some cases.