Skip to content

Commit

Permalink
Regenerate JSON to match current YAML
Browse files Browse the repository at this point in the history
This looks like it is adding the JSON for #199 and what looks like some out-of-sync JSON and YAML from mustache#149.
  • Loading branch information
Mr0grog committed Nov 15, 2023
1 parent 982aa9b commit 01715a8
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
42 changes: 42 additions & 0 deletions specs/sections.json
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,48 @@
"template": "\"{{#list}}({{#.}}{{.}}{{/.}}){{/list}}\"",
"expected": "\"(123)(abc)\""
},
{
"name": "Implicit Iterator - HTML Escaping",
"desc": "Implicit iterators with basic interpolation should be HTML escaped.",
"data": {
"list": [
"&",
"\"",
"<",
">"
]
},
"template": "\"{{#list}}({{.}}){{/list}}\"",
"expected": "\"(&amp;)(&quot;)(&lt;)(&gt;)\""
},
{
"name": "Implicit Iterator - Triple mustache",
"desc": "Implicit iterators in triple mustache should interpolate without HTML escaping.",
"data": {
"list": [
"&",
"\"",
"<",
">"
]
},
"template": "\"{{#list}}({{{.}}}){{/list}}\"",
"expected": "\"(&)(\")(<)(>)\""
},
{
"name": "Implicit Iterator - Ampersand",
"desc": "Implicit iterators in an Ampersand tag should interpolate without HTML escaping.",
"data": {
"list": [
"&",
"\"",
"<",
">"
]
},
"template": "\"{{#list}}({{&.}}){{/list}}\"",
"expected": "\"(&)(\")(<)(>)\""
},
{
"name": "Dotted Names - Truthy",
"desc": "Dotted names should be valid for Section tags.",
Expand Down
2 changes: 1 addition & 1 deletion specs/~lambdas.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
"clojure": "(fn [text] (if (= text \"{{x}}\") \"yes\" \"no\"))",
"lisp": "(lambda (text) (if (string= text \"{{x}}\") \"yes\" \"no\"))",
"pwsh": "if ($args[0] -eq \"{{x}}\") {\"yes\"} else {\"no\"}",
"go": "func(text string) string { if text == \"{{x}}\" { return \"yes\" } else { return \"no\" } }"
"go": "func(text string) string { if text == \"{{x}}\" { return \"yes\" } else { return \"no\" } }"
}
},
"template": "<{{#lambda}}{{x}}{{/lambda}}>",
Expand Down

0 comments on commit 01715a8

Please sign in to comment.