- The translation callback can now take an optional
context
parameter with the name of the source template - pull #92 - Added a "makepot" tool to extract translation keys from a set of Diet template files - pull #92
- Fix documentation build and update test settings - issue #87
- Fix a deprecated Nullable alias this instance - issue #84
- Add support for DMD 2.094
-preview=in
switch - issue #85 - Update release notes & meson build for v1.7.3 - issue #86
- Add back in import for
std.conv.to
- issue #82
- Fixed an issue where the translation callback had to be marked
@safe
- pull #80 - Updates the Meson version number of the package - issue #79, pull #80
- Adds support for a new "live mode" (by Steven Schveighoffer) - pull #70, pull #78
- Enabled by defining a version
DietUseLive
- Allows changes to the template to be reflected immediately at runtime
- Only pure HTML changes are supported, changing embedded code will require a re-compile
- Can greatly reduce the edit cycle during development - should not be used for production builds
- Enabled by defining a version
- Avoids redundant template compilations for templats instantiated with the same parameters (by Steven Schveighoffer) - pull #77
- Fixed a possible range violation error (by Steven Schveighoffer) - issue #75, pull #76
- Fixes the "transitional" HTML doctype string (by WebFreak) - pull #60
- Compiles without deprecation warnings on DMD 2.088.0 - pull #66
- Fixes the use of C++ style line comments in code lines - issue #58, pull #73
- Avoids excessive CTFE stack traces when syntax errors are encountered - issue #69, pull #73
- Adds the new "extension includes" feature, combining blocks/extensions with includes - pull #64
- Adds
Node.clone
andNodeContent.clone
for recursive DOM cloning - pull #64 - Updates compiler support to DMD 2.082.1 up to 2.087.1 and LDC 1.12.0 up to 1.16.0 - pull #64
- Adds
Node.translationKey
to allow external code to access the original translation key for translated nodes - pull #55
- Avoid singular tag enforcement for non-HTML documents - issue #45, pull #49
- Always output empty XML elements using singular tag syntax - pull #50
- Fix broken XML doctype string (by Nicholas Wilson) - pull #47
- Fix deprecation warnings on DMD 2.079.0
Note: 1.4.3 and 1.4.4 just bumped the used vibe.d version of the examples.
- Fixes "variable val is shadowing variable" errors when defining a variable
val
in a template - issue #35 - Fixes missing escaping for quotes in HTML attributes that are not typed
bool
orstring
- issue #36 - Tweaked the Meson build description to be usable as a sub project - pull #39
- Adds a Meson project description (by Matthias Klumpp aka ximion) - pull #37
- Implemented support for multi-line nodes (by Jan Jurzitza aka WebFreak) - issue vibe.d#1307
- The shortcut syntax for class/id attributes is now allowed to start with a digit - issue #32
- Heavily reduced the length of template symbol named generated during compilation, resulting in a lot less binary bloat
- Added support for a
.processors
field in traits structs that contains a list or arbitrary DOM modification functions - Add DOM manipulation convenience functions
- Fixed/implemented HTML white space inhibition using the
<
/>
suffixes - issue #27
- Added
compileHTMLDietFileString
, a variant ofcompileHTMLDietString
that can make use of includes and extensions - issue #24 - Fixed a compile error for filter nodes and output ranges that are not
nothrow
- Fixed extraneous newlines getting inserted in front of HTML text nodes when pretty printing was enabled
- Fixes formatting of singluar elements in pretty HTML output - issue #18
- Added support for Boolean attributes that are sourced from a property/implicit function call (by Sebastian Wilzbach) - issue #19, pull #20
- Works around an internal compiler error on 2.072.2 that got triggered in 1.1.2
- Class/ID definitions (
.cls#id
) can now be specified in any order - issue #9 - Block definitions can now also be in included files - issue #14
- Multiple contents definitions for the same block are now handled properly - issue #13
- Fixed parsing of empty lines in raw text blocks
This release adds support for pretty printing and increases backwards compatibility with older DMD front end versions.
- Compiles on DMD 2.068.0 up to 2.071.2
- Supports pretty printed HTML output by inserting a
htmlOutputStyle
field in a traits struct - issue #8
This is the first stable release of diet-ng. Compared to the original
vibe.templ.diet
module in vibe.d, it offers a large number of
improvements.
- No external dependencies other than Phobos
- Extensible/configurable with traits structures
- Supports inline and nested tags syntax
- Supports string interpolations within filter nodes (falls back to runtime filters)
- Supports arbitrary uses other than generating HTML, for example we use it similar to QML/XAML for our internal UI framework
- The API is
@safe
andnothrow
where possible - Uses less memory during compilation
- Comprehensive unit test suite used throughout development
- Supports AngularJS special attribute names