-
Notifications
You must be signed in to change notification settings - Fork 275
Implementation Notes
John Albin Wilkins edited this page Apr 8, 2021
·
35 revisions
- currently twig.js does not have the same auto-escaping that Twig does.
Docs: Twig 3.x tags
Example syntax: {% tagName %}
-
apply: ??? -
autoescape: ??? -
block: Supported -
cache: ??? -
deprecated: ??? -
do: ??? -
embed: Supported -
extends: Supported -
flush: N/A -
for: Supported -
from: Supported -
if: Supported -
import: Supported -
include: Supported -
macro: Supported -
sandbox: ??? -
set: Supported -
use: Supported -
verbatim: Supported -
with: Supported
Docs: Twig 3.x filters
Example syntax: {{ variable|filterName }}
-
abs: Supported -
batch: Supported -
capitalize: Supported -
column: ??? -
convert_encoding: N/A -
country_name: ??? -
currency_name: ??? -
currency_symbol: ??? -
data_uri: ??? -
date: Supported -
date_modify: Supported -
default: Supported -
escape: Supported -
filter: Supported -
first: Supported -
format: Supported -
format_currency: ??? -
format_date: ??? -
format_datetime: ??? -
format_number: ??? -
format_time: ??? -
html_to_markdown: ??? -
inky_to_html: ??? -
inline_css: ??? -
join: Supported -
json_encode: Supported -
keys: Supported -
language_name: ??? -
last: Supported -
length: Supported -
locale_name: ??? -
lower: Supported -
map: ??? -
markdown_to_html: ??? -
merge: Supported -
nl2br: Supported -
number_format: Supported -
raw: ??? -
replace: Supported -
reverse: Supported -
round: Supported -
slice: Supported -
sort: Supported -
spaceless: Supported -
split: Supported -
striptags: Supported -
timezone_name: ??? -
title: Supported -
trim: Supported -
u: ??? -
upper: Supported -
url_encode: Supported
Docs: Twig 3.x functions
Example syntax: {{ functionName(arguments) }}
-
attribute: ??? -
block: ??? -
constant: ??? -
cycle: ??? -
date: ??? -
dump: ??? -
html_classes: ??? -
include: Throws error: "include function does not exist and is not defined in the context" https://github.com/twigjs/twig.js/issues/392 -
max: ??? -
min: ??? -
parent: ??? -
random: ??? -
range: ??? -
source: ??? -
country_timezones: ??? -
template_from_string: ???
Docs: Twig 3.x tests
Example syntax: {{ expression is testName }}
-
constant: -
defined: Supported -
divisibleby: Supported -
empty: Supported -
even: Supported -
iterable: Supported -
null/none: Supported -
odd: Supported -
sameas: Supported
Docs: Twig 3.x operators
Example syntax: {{ expression operator expression }}
-
in: Supported -
is: Supported - Math (
+,-,/,%,*,**): Supported - Logic (
and,or,not,()): Supported - Bitwise (
b-and,b-or,b-xor): Supported - Comparisons (
==,!=,<,>,>=,<=,===): Supported - Others (
..,|,~,.,[],?:): Supported - Null-coalescing (
??): Supported