12
12
13
13
Ribboncurls is a [ Mustache] template rendering engine written in [ Rust] .
14
14
15
- There is both a Rust [ Ribboncurls library] and [ Ribboncurls CLI tool] , depending
16
- on your needs. You can read more about those specific projects in their
17
- respective README.md files.
15
+ There is both a Rust [ Ribboncurls library] and [ Ribboncurls CLI tool] ,
16
+ depending on your needs. You can read more about those specific projects
17
+ in their respective README.md files.
18
18
19
19
** Note** : Ribboncurls library public API is subject to change, so use
20
20
with caution.
21
21
22
- ## Mustache spec tests
23
-
24
- We run the [ mustache spec tests] against the Ribboncurls lib and we are
25
- passing all 133 of 133 tests.
26
-
27
- <details ><summary >Tests</summary >
28
- ✅ comments::inline<br >
29
- ✅ comments::standalone<br >
30
- ✅ comments::multiline_standalone<br >
31
- ✅ comments::variable_name_collision<br >
32
- ✅ comments::multiline<br >
33
- ✅ comments::indented_inline<br >
34
- ✅ comments::indented_standalone<br >
35
- ✅ comments::indented_multiline_standalone<br >
36
- ✅ comments::surrounding_whitespace<br >
37
- ✅ comments::standalone_line_endings<br >
38
- ✅ comments::standalone_without_previous_line<br >
39
- ✅ comments::standalone_without_newline<br >
40
- ✅ delimiters::pair_behavior<br >
41
- ✅ delimiters::pair_with_padding<br >
42
- ✅ delimiters::indented_standalone_tag<br >
43
- ✅ delimiters::outlying_whitespace_inline<br >
44
- ✅ delimiters::special_characters<br >
45
- ✅ delimiters::standalone_tag<br >
46
- ✅ interpolation::ampersand_context_miss_interpolation<br >
47
- ✅ delimiters::surrounding_whitespace<br >
48
- ✅ delimiters::standalone_without_newline<br >
49
- ✅ delimiters::standalone_without_previous_line<br >
50
- ✅ interpolation::ampersand<br >
51
- ✅ delimiters::inverted_sections<br >
52
- ✅ delimiters::standalone_line_endings<br >
53
- ✅ delimiters::post_partial_behavior<br >
54
- ✅ interpolation::ampersand_integer_interpolation<br >
55
- ✅ delimiters::sections<br >
56
- ✅ interpolation::ampersand_standalone<br >
57
- ✅ interpolation::ampersand_decimal_interpolation<br >
58
- ✅ interpolation::ampersand_with_padding<br >
59
- ✅ interpolation::ampersand_null_interpolation<br >
60
- ✅ interpolation::basic_context_miss_interpolation<br >
61
- ✅ interpolation::ampersand_surrounding_whitespace<br >
62
- ✅ interpolation::basic_null_interpolation<br >
63
- ✅ interpolation::dotted_names_broken_chain_resolution<br >
64
- ✅ interpolation::basic_decimal_interpolation<br >
65
- ✅ interpolation::basic_integer_interpolation<br >
66
- ✅ interpolation::dotted_names_arbitrary_depth<br >
67
- ✅ interpolation::dotted_names_broken_chains<br >
68
- ✅ interpolation::dotted_names_ampersand_interpolation<br >
69
- ✅ interpolation::basic_interpolation<br >
70
- ✅ delimiters::partial_inheritence<br >
71
- ✅ interpolation::dotted_names_basic_interpolation<br >
72
- ✅ interpolation::dotted_names_context_precedence<br >
73
- ✅ interpolation::implicit_iterators_basic_integer_interpolation<br >
74
- ✅ interpolation::html_escaping<br >
75
- ✅ interpolation::dotted_names_initial_resolution<br >
76
- ✅ interpolation::implicit_iterators_triple_mustache<br >
77
- ✅ interpolation::interpolation_surrounding_whitespace<br >
78
- ✅ interpolation::implicit_iterators_ampersand<br >
79
- ✅ interpolation::dotted_names_triple_mustache_interpolation<br >
80
- ✅ interpolation::interpolation_standalone<br >
81
- ✅ interpolation::implicit_iterators_basic_interpolation<br >
82
- ✅ interpolation::interpolation_with_padding<br >
83
- ✅ interpolation::implicit_iterators_html_escaping<br >
84
- ✅ interpolation::triple_mustache<br >
85
- ✅ interpolation::no_interpolation<br >
86
- ✅ interpolation::triple_mustache_surrounding_whitespace<br >
87
- ✅ interpolation::triple_mustache_context_miss_interpolation<br >
88
- ✅ interpolation::triple_mustache_standalone<br >
89
- ✅ interpolation::triple_mustache_integer_interpolation<br >
90
- ✅ interpolation::triple_mustache_null_interpolation<br >
91
- ✅ interpolation::triple_mustache_with_padding<br >
92
- ✅ interpolation::triple_mustache_decimal_interpolation<br >
93
- ✅ inverted::context_misses<br >
94
- ✅ inverted::context<br >
95
- ✅ inverted::dotted_names_truthy<br >
96
- ✅ inverted::falsey<br >
97
- ✅ inverted::dotted_names_broken_chains<br >
98
- ✅ inverted::empty_list<br >
99
- ✅ inverted::dotted_names_falsey<br >
100
- ✅ inverted::list<br >
101
- ✅ inverted::doubled<br >
102
- ✅ inverted::indented_inline_sections<br >
103
- ✅ inverted::internal_whitespace<br >
104
- ✅ inverted::nested_falsey<br >
105
- ✅ inverted::padding<br >
106
- ✅ inverted::null_is_falsey<br >
107
- ✅ inverted::standalone_line_endings<br >
108
- ✅ inverted::standalone_indented_lines<br >
109
- ✅ inverted::nested_truthy<br >
110
- ✅ inverted::standalone_lines<br >
111
- ✅ inverted::truthy<br >
112
- ✅ inverted::standalone_without_previous_line<br >
113
- ✅ partials::failed_lookup<br >
114
- ✅ inverted::standalone_without_newline<br >
115
- ✅ inverted::surrounding_whitespace<br >
116
- ✅ partials::standalone_without_previous_line<br >
117
- ✅ partials::basic_behavior<br >
118
- ✅ partials::context<br >
119
- ✅ partials::padding_whitespace<br >
120
- ✅ partials::inline_indentation<br >
121
- ✅ sections::dotted_names_broken_chains<br >
122
- ✅ sections::dotted_names_falsey<br >
123
- ✅ partials::standalone_line_endings<br >
124
- ✅ partials::standalone_indentation<br >
125
- ✅ partials::nested<br >
126
- ✅ partials::surrounding_whitespace<br >
127
- ✅ sections::dotted_names_truthy<br >
128
- ✅ partials::standalone_without_newline<br >
129
- ✅ partials::recursion<br >
130
- ✅ sections::context<br >
131
- ✅ sections::empty_list<br >
132
- ✅ sections::falsey<br >
133
- ✅ sections::context_misses<br >
134
- ✅ sections::doubled<br >
135
- ✅ sections::implicit_iterator_html_escaping<br >
136
- ✅ sections::implicit_iterator_decimal<br >
137
- ✅ sections::implicit_iterator_root_level<br >
138
- ✅ sections::implicit_iterator_ampersand<br >
139
- ✅ sections::implicit_iterator_string<br >
140
- ✅ sections::implicit_iterator_integer<br >
141
- ✅ sections::implicit_iterator_array<br >
142
- ✅ sections::indented_standalone_lines<br >
143
- ✅ sections::implicit_iterator_triple_mustache<br >
144
- ✅ sections::list<br >
145
- ✅ sections::indented_inline_sections<br >
146
- ✅ sections::internal_whitespace<br >
147
- ✅ sections::padding<br >
148
- ✅ sections::deeply_nested_contexts<br >
149
- ✅ sections::standalone_lines<br >
150
- ✅ sections::nested_falsey<br >
151
- ✅ sections::parent_contexts<br >
152
- ✅ sections::standalone_line_endings<br >
153
- ✅ sections::null_is_falsey<br >
154
- ✅ sections::list_contexts<br >
155
- ✅ sections::standalone_without_newline<br >
156
- ✅ sections::surrounding_whitespace<br >
157
- ✅ sections::nested_truthy<br >
158
- ✅ sections::variable_test<br >
159
- ✅ sections::truthy<br >
160
- ✅ sections::standalone_without_previous_line<br >
161
- </details >
162
-
22
+ ## Features
23
+
24
+ Ribboncurls supports all the required Mustache features as per [ Mustache
25
+ spec] and runs against the [ Mustache v1.4.2 spec] tests.
26
+
27
+ - [x] Comments: ` 12345{{! Comment Block! }}67890 `
28
+ - [x] Delimiters: Change delimiters from ` {{ }} ` to your own custom
29
+ delimiters
30
+ - ` {{=<% %>=}}(<%text%>) `
31
+ - [x] Interpolation
32
+ - ` {{text}} ` - Renders escaped variable ` text `
33
+ - ` {{&text}} ` , ` {{{text}}} ` - Renders variable ` text ` without
34
+ escaping
35
+ - ` {{a.b.c.d}} ` - Renders HashMap properties
36
+ - and more
37
+ - [x] Sections
38
+ - ` {{#text}}Renders when text exists{{/text}} ` - Renders section
39
+ when ` text ` is truthy
40
+ - ` {{#animals_array}}({{.}}){{/list}} ` - Implicit iterator
41
+ - [x] Inverted: Functionally serves as inverted sections
42
+ - ` {{^text}}Renders when text does not exist{{/text}} `
43
+ - [x] Partials: Used to expand an external template into the current
44
+ template
45
+ - ` {{>partial_property}} `
163
46
164
47
## Code of Conduct
165
48
@@ -182,4 +65,5 @@ license. See the [THIRD_PARTY_LICENSES] file for details.
182
65
[ MPL-2.0 ] : LICENSE
183
66
[ Code of Conduct ] : https://github.com/tinted-theming/home/blob/main/CODE_OF_CONDUCT.md
184
67
[ THIRD_PARTY_LICENSES ] : THIRD_PARTY_LICENSES.md
185
- [ mustache spec tests ] : https://github.com/mustache/spec
68
+ [ Mustache spec ] : https://github.com/mustache/spec
69
+ [ mustache v1.4.2 spec ] : https://github.com/mustache/spec/tree/v1.4.2
0 commit comments