jinja 0.6.1-dev.5 jinja: ^0.6.1-dev.5 copied to clipboard
Jinja2 template engine for Dart. Variables, expressions, control structures and template inheritance.
0.6.1-dev.5 ( #
- Added:
UndefinedError
exceptionUndefinedFactory
typedefEnvironment
:Environment({UndefinedFactory undefined})
argumentUndefinedFactory undefined
field
Template
:Template({UndefinedFactory undefined})
argument
- Filters:
null
(none
alias)
0.6.0 ( #
- Bump SDK version to 3.3.0.
- Update dependencies.
- Internal changes.
chrome
platform tests.- Added:
- Statements:
import
from
Template
:Template.fromNode({globals})
argumentglobals
field
- Statements:
- Restored:
- Conditional and variable
extends
statement variants - Choice, ignore missing and variable
include
statement variants
- Conditional and variable
- Changed:
Environment
:Environment.lex()
return fromList<Token>
toIterable<Token>
Environment.scan(tokens)
argument type fromList<Token>
toIterable<Token>
- Removed:
- Exceptions:
FilterArgumentError
*args
and**kwargs
support
- Exceptions:
0.5.0 #
- Minimal SDK version: 3.0.0.
- Internal changes.
- Added:
Template
:Template.fromNode(Environment environment, {String? path, required Node body})
constructor
- Statements:
macro
call
- Filters:
items
title
- Changed:
Environment
:Environment({modifiers})
argument type fromList<NodeVisitor>
toList<Node Function(Node)>
modifiers
type fromList<NodeVisitor>
toList<Node Function(Node)>
scan(...)
return type fromList<Node>
toNode
parse(...)
return type fromList<Node>
toNode
Template
:Template({modifiers})
argument type fromList<NodeVisitor>
toList<Node Function(Node)>
- Filters:
truncate
arguments are now positional
- Removed:
Template
:Template.fromNodes(...)
constructor
- Statements:
autoescape
- Filters:
forceescape
safe
unsafe
- Tests:
escaped
0.4.2 #
- Internal changes.
0.4.1 #
- Update links.
0.4.0 #
- Minimal SDK version: 2.18.0.
- Added:
passContext
andpassEnvironment
functionsprint
to globals{{ do print(name) }}
Environment
Environment({lineCommentPrefix, lineStatementPrefix, newLine, autoReload, modifiers, templates})
constructor argumentsautoReload
fieldlexer
fieldlineCommentPrefix
fieldlineStatementPrefix
fieldloader
fieldmodifiers
fieldnewLine
fieldlex
methodscan
methodparse
method
Template
Template({path, lineCommentPrefix, lineStatementPrefix, newLine, modifiers, templates})
constructor argumentsrenderTo
method
- Exceptions (was internal):
TemplateError
TemplateSyntaxError
TemplateAssertionError
TemplateNotFound
TemplatesNotFound
TemplateRuntimeError
FilterArgumentError
- Statements:
do
with
- Filters:
dictsort
replace
reverse
safe
slice
striptags
truncate
wordcount
wordwrap
item
map
tojson
- Test:
filter
test
- Changed:
FieldGetter
type definition renamed toAttributeGetter
default
filter compare values withnull
, no boolean argumentdefined
andundefined
tests compare values withnull
Environment
Environment({getField})
constructor argument renamed togetAttribute
getField
field renamed togetAttribute
Template
Template({parent})
constructor argument renamed toenvironment
and doesn't copy the environmentrenderMap
method renamed torender
Loader.listSources
method renamed tolistTemplates
MapLoader.mapping
field renamed tosources
FileSystemLoader
FileSystemLoader({paths})
argument is now non-nullable, defaults to['templates']
- moved to
package:jinja/loaders.dart
library
package:jinja/get_field.dart
library renamed topackage:jinja/reflection.dart
getField
function renamed togetAttribute
- Removed:
Undefined
type andmissing
objectEnvironment.undefined
methodTemplate.render
methodFileSystemLoader
:FileSystemLoader({path, autoReload})
argumentsautoReload
fielddirectory
field
- Slices and negative indexes
- Conditional and variable
extends
statement variants - Choice, ignore missing and variable
include
statement variants
- Internal changes