From be1a123b37eb0df7cad56625f23c3ca83cfc4234 Mon Sep 17 00:00:00 2001 From: Lloyd McKenzie Date: Mon, 6 Apr 2026 11:47:25 -0600 Subject: [PATCH 1/5] New Liquid test cases --- r5/liquid/liquid-tests.json | 83 ++++++++++++++++++++++++++++++++++++- 1 file changed, 82 insertions(+), 1 deletion(-) diff --git a/r5/liquid/liquid-tests.json b/r5/liquid/liquid-tests.json index 7900395b..2accabf4 100644 --- a/r5/liquid/liquid-tests.json +++ b/r5/liquid/liquid-tests.json @@ -95,6 +95,11 @@ "focus" : "Patient/example", "template" : "{%for telecom in Patient.telecom reversed%}{{telecom.use}}{%endfor%}", "output" : "oldmobileworkhome" + },{ + "name" : "forsplit", + "focus" : "Patient/example", + "template" : "{% assign l = 'a,b,c' || split: ',' %}{%for s in l %}{{s}}{%endfor%}", + "output" : "abc" },{ "name" : "assign1", "focus" : "Patient/example", @@ -110,5 +115,81 @@ "focus" : "Patient/example", "template" : "{% capture my_variable %}false{%endcapture%}{% if my_variable != true %}This statement is valid.{% endif %}", "output" : "This statement is valid." - }] + },{ + "name" : "upcase", + "focus" : "Patient/example", + "template" : "{{ \"Parker Moore\" || upcase }}", + "output" : "PARKER MOORE" + },{ + "name" : "downcase", + "focus" : "Patient/example", + "template" : "{{ \"Parker Moore\" || downcase }}", + "output" : "parker moore" + },{ + "name" : "capitalize", + "focus" : "Patient/example", + "template" : "{{ \"my GREAT title\" || capitalize }}", + "output" : "My great title" + },{ + "name" : "replace", + "focus" : "Patient/example", + "template" : "{{ \"Take my protein pills and put my helmet on\" || replace: \"my\", \"your\" }}", + "output" : "Take your protein pills and put your helmet on" + },{ + "name" : "replace_first", + "focus" : "Patient/example", + "template" : "{{ \"Take my protein pills and put my helmet on\" || replace_first: \"my\", \"your\" }}", + "output" : "Take your protein pills and put my helmet on" + },{ + "name" : "replace_last", + "focus" : "Patient/example", + "template" : "{{ \"Take my protein pills and put my helmet on\" || replace_last: \"my\", \"your\" }}", + "output" : "Take my protein pills and put your helmet on" + },{ + "name" : "remove", + "focus" : "Patient/example", + "template" : "{{ \"I strained to see the train through the rain\" || remove: \"rain\" }}", + "output" : "I sted to see the t through the " + },{ + "name" : "remove_first", + "focus" : "Patient/example", + "template" : "{{ \"I strained to see the train through the rain\" || remove_first: \"rain\" }}", + "output" : "I sted to see the train through the rain" + },{ + "name" : "remove_last", + "focus" : "Patient/example", + "template" : "{{ \"I strained to see the train through the rain\" || remove_last: \"rain\" }}", + "output" : "I strained to see the train through the " + },{ + "name" : "date1", + "focus" : "Patient/example", + "template" : "{{ \"2015-07-17\" || date: \"%a, %b %d, %y\" }}", + "output" : "Fri, Jul 17, 15" + },{ + "name" : "date2", + "focus" : "Patient/example", + "template" : "{{ \"2015-07-17\" || date: \"%Y\" }}", + "output" : "2015" + },{ + "name" : "date3", + "focus" : "Patient/example", + "template" : "{{ \"2016-03-14\" || date: \"%b %d, %y\" }}", + "output" : "Mar 14, 16" + },{ + "name" : "date4", + "focus" : "Patient/example", + "template" : "{{ \"2015-07-17T00:46:00Z\" || date: \"%Y-%m-%d %H:%M\" }}", + "output" : "2015-07-17 00:46" + },{ + "name" : "date5", + "focus" : "Patient/example", + "template" : "{{ \"July 3, 2002\" || date: \"%Y-%m-%d\" }}", + "output" : "2002-07-03" + },{ + "name" : "date", + "focus" : "Patient/example", + "template" : "{{ \"7-3-02\" || date: \"%Y-%m-%d\" }}", + "output" : "2002-07-03" + } + ] } From a33e52df3d018981cca5cc610d2803eb2cc9d116 Mon Sep 17 00:00:00 2001 From: Lloyd McKenzie Date: Mon, 6 Apr 2026 13:08:42 -0600 Subject: [PATCH 2/5] Additional tests for new functions --- r5/liquid/liquid-tests.json | 459 +++++++++++++++++++++++++++++++++++- 1 file changed, 452 insertions(+), 7 deletions(-) diff --git a/r5/liquid/liquid-tests.json b/r5/liquid/liquid-tests.json index 2accabf4..3055ea5a 100644 --- a/r5/liquid/liquid-tests.json +++ b/r5/liquid/liquid-tests.json @@ -185,11 +185,456 @@ "focus" : "Patient/example", "template" : "{{ \"July 3, 2002\" || date: \"%Y-%m-%d\" }}", "output" : "2002-07-03" - },{ - "name" : "date", - "focus" : "Patient/example", - "template" : "{{ \"7-3-02\" || date: \"%Y-%m-%d\" }}", - "output" : "2002-07-03" - } - ] + },{ + "name" : "date", + "focus" : "Patient/example", + "template" : "{{ \"7-3-02\" || date: \"%Y-%m-%d\" }}", + "output" : "2002-07-03" + },{ + "name" : "append", + "focus" : "Patient/example", + "template" : "{{ \"/my/fancy/url\" || append: \".html\" }}", + "output" : "/my/fancy/url.html" + },{ + "name" : "append2", + "focus" : "Patient/example", + "template" : "{{ \"Adam\" || append: \"!\" }}", + "output" : "Adam!" + },{ + "name" : "base64_encode", + "focus" : "Patient/example", + "template" : "{{ \"one two three\" || base64_encode }}", + "output" : "b25lIHR3byB0aHJlZQ==" + },{ + "name" : "base64_decode", + "focus" : "Patient/example", + "template" : "{{ \"b25lIHR3byB0aHJlZQ==\" || base64_decode }}", + "output" : "one two three" + },{ + "name" : "escape", + "focus" : "Patient/example", + "template" : "{{ \"Have you read 'James & the Giant Peach'?\" || escape }}", + "output" : "Have you read 'James & the Giant Peach'?" + },{ + "name" : "escape_once", + "focus" : "Patient/example", + "template" : "{{ \"1 < 2 & 3\" || escape_once }}", + "output" : "1 < 2 & 3" + },{ + "name" : "lstrip", + "focus" : "Patient/example", + "template" : "{{ \" So much room for activities! \" || lstrip }}", + "output" : "So much room for activities! " + },{ + "name" : "rstrip", + "focus" : "Patient/example", + "template" : "{{ \" So much room for activities! \" || rstrip }}", + "output" : " So much room for activities!" + },{ + "name" : "strip", + "focus" : "Patient/example", + "template" : "{{ \" So much room for activities! \" || strip }}", + "output" : "So much room for activities!" + },{ + "name" : "newline_to_br", + "focus" : "Patient/example", + "template" : "{{ \"Hello\nWorld\" || newline_to_br }}", + "output" : "Hello
\nWorld" + },{ + "name" : "slice1", + "focus" : "Patient/example", + "template" : "{{ \"Liquid\" || slice: 0 }}", + "output" : "L" + },{ + "name" : "slice2", + "focus" : "Patient/example", + "template" : "{{ \"Liquid\" || slice: 2 }}", + "output" : "q" + },{ + "name" : "slice3", + "focus" : "Patient/example", + "template" : "{{ \"Liquid\" || slice: 2, 5 }}", + "output" : "quid" + },{ + "name" : "slice_negative", + "focus" : "Patient/example", + "template" : "{{ \"Liquid\" || slice: -3, 2 }}", + "output" : "ui" + },{ + "name" : "strip_html", + "focus" : "Patient/example", + "template" : "{{ \"Have you read Erta?\" || strip_html }}", + "output" : "Have you read Erta?" + },{ + "name" : "strip_newlines", + "focus" : "Patient/example", + "template" : "{{ \"Hello\nthere\" || strip_newlines }}", + "output" : "Hellothere" + },{ + "name" : "truncate1", + "focus" : "Patient/example", + "template" : "{{ \"Ground control to Major Tom.\" || truncate: 20 }}", + "output" : "Ground control to..." + },{ + "name" : "truncate2", + "focus" : "Patient/example", + "template" : "{{ \"Ground control to Major Tom.\" || truncate: 25, \", and so on\" }}", + "output" : "Ground control, and so on" + },{ + "name" : "truncate3", + "focus" : "Patient/example", + "template" : "{{ \"Ground control to Major Tom.\" || truncate: 20, \"\" }}", + "output" : "Ground control to Ma" + },{ + "name" : "truncatewords1", + "focus" : "Patient/example", + "template" : "{{ \"Ground control to Major Tom.\" || truncatewords: 3 }}", + "output" : "Ground control to..." + },{ + "name" : "truncatewords2", + "focus" : "Patient/example", + "template" : "{{ \"Ground control to Major Tom.\" || truncatewords: 3, \"---\" }}", + "output" : "Ground control to---" + },{ + "name" : "truncatewords3", + "focus" : "Patient/example", + "template" : "{{ \"Ground control to Major Tom.\" || truncatewords: 3, \"\" }}", + "output" : "Ground control to" + },{ + "name" : "url_encode", + "focus" : "Patient/example", + "template" : "{{ \"john@liquid.com\" || url_encode }}", + "output" : "john%40liquid.com" + },{ + "name" : "url_encode2", + "focus" : "Patient/example", + "template" : "{{ \"Tetsuro Takara\" || url_encode }}", + "output" : "Tetsuro+Takara" + },{ + "name" : "url_decode", + "focus" : "Patient/example", + "template" : "{{ \"%27Stop%21%27+said+Fred\" || url_decode }}", + "output" : "'Stop!' said Fred" + },{ + "name" : "url_decode2", + "focus" : "Patient/example", + "template" : "{{ \"rain+100%25\" || url_decode }}", + "output" : "rain 100%" + },{ + "name" : "abs1", + "focus" : "Patient/example", + "template" : "{{ \"-17\" || abs }}", + "output" : "17" + },{ + "name" : "abs2", + "focus" : "Patient/example", + "template" : "{{ \"4\" || abs }}", + "output" : "4" + },{ + "name" : "abs3", + "focus" : "Patient/example", + "template" : "{{ \"-19.86\" || abs }}", + "output" : "19.86" + },{ + "name" : "at_least1", + "focus" : "Patient/example", + "template" : "{{ \"4\" || at_least: 5 }}", + "output" : "5" + },{ + "name" : "at_least2", + "focus" : "Patient/example", + "template" : "{{ \"4\" || at_least: 3 }}", + "output" : "4" + },{ + "name" : "at_most1", + "focus" : "Patient/example", + "template" : "{{ \"4\" || at_most: 5 }}", + "output" : "4" + },{ + "name" : "at_most2", + "focus" : "Patient/example", + "template" : "{{ \"4\" || at_most: 3 }}", + "output" : "3" + },{ + "name" : "ceil1", + "focus" : "Patient/example", + "template" : "{{ \"1.2\" || ceil }}", + "output" : "2" + },{ + "name" : "ceil2", + "focus" : "Patient/example", + "template" : "{{ \"2.0\" || ceil }}", + "output" : "2" + },{ + "name" : "ceil3", + "focus" : "Patient/example", + "template" : "{{ \"183.357\" || ceil }}", + "output" : "184" + },{ + "name" : "divided_by1", + "focus" : "Patient/example", + "template" : "{{ \"16\" || divided_by: 4 }}", + "output" : "4" + },{ + "name" : "divided_by2", + "focus" : "Patient/example", + "template" : "{{ \"5\" || divided_by: 3 }}", + "output" : "1" + },{ + "name" : "divided_by3", + "focus" : "Patient/example", + "template" : "{{ \"20\" || divided_by: 7.0 }}", + "output" : "2.857142857142857" + },{ + "name" : "floor1", + "focus" : "Patient/example", + "template" : "{{ \"1.2\" || floor }}", + "output" : "1" + },{ + "name" : "floor2", + "focus" : "Patient/example", + "template" : "{{ \"2.0\" || floor }}", + "output" : "2" + },{ + "name" : "floor3", + "focus" : "Patient/example", + "template" : "{{ \"183.357\" || floor }}", + "output" : "183" + },{ + "name" : "minus1", + "focus" : "Patient/example", + "template" : "{{ \"4\" || minus: 2 }}", + "output" : "2" + },{ + "name" : "minus2", + "focus" : "Patient/example", + "template" : "{{ \"16\" || minus: 4 }}", + "output" : "12" + },{ + "name" : "minus3", + "focus" : "Patient/example", + "template" : "{{ \"183.357\" || minus: 12 }}", + "output" : "171.357" + },{ + "name" : "modulo1", + "focus" : "Patient/example", + "template" : "{{ \"3\" || modulo: 2 }}", + "output" : "1" + },{ + "name" : "modulo2", + "focus" : "Patient/example", + "template" : "{{ \"24\" || modulo: 7 }}", + "output" : "3" + },{ + "name" : "modulo3", + "focus" : "Patient/example", + "template" : "{{ \"183.357\" || modulo: 12 }}", + "output" : "3.3569999999999993" + },{ + "name" : "plus1", + "focus" : "Patient/example", + "template" : "{{ \"4\" || plus: 2 }}", + "output" : "6" + },{ + "name" : "plus2", + "focus" : "Patient/example", + "template" : "{{ \"16\" || plus: 4 }}", + "output" : "20" + },{ + "name" : "plus3", + "focus" : "Patient/example", + "template" : "{{ \"183.357\" || plus: 12 }}", + "output" : "195.357" + },{ + "name" : "round1", + "focus" : "Patient/example", + "template" : "{{ \"1.2\" || round }}", + "output" : "1" + },{ + "name" : "round2", + "focus" : "Patient/example", + "template" : "{{ \"2.7\" || round }}", + "output" : "3" + },{ + "name" : "round3", + "focus" : "Patient/example", + "template" : "{{ \"183.357\" || round: 2 }}", + "output" : "183.36" + },{ + "name" : "times1", + "focus" : "Patient/example", + "template" : "{{ \"3\" || times: 2 }}", + "output" : "6" + },{ + "name" : "times2", + "focus" : "Patient/example", + "template" : "{{ \"24\" || times: 7 }}", + "output" : "168" + },{ + "name" : "times3", + "focus" : "Patient/example", + "template" : "{{ \"183.357\" || times: 12 }}", + "output" : "2200.284" + },{ + "name" : "first", + "focus" : "Patient/example", + "template" : "{{ \"John, Paul, George, Ringo\" || split: \", \" || first }}", + "output" : "John" + },{ + "name" : "last", + "focus" : "Patient/example", + "template" : "{{ \"John, Paul, George, Ringo\" || split: \", \" || last }}", + "output" : "Ringo" + },{ + "name" : "join", + "focus" : "Patient/example", + "template" : "{{ \"John, Paul, George, Ringo\" || split: \", \" || join: \" and \" }}", + "output" : "John and Paul and George and Ringo" + },{ + "name" : "reverse", + "focus" : "Patient/example", + "template" : "{{ \"John, Paul, George, Ringo\" || split: \", \" || reverse || join: \", \" }}", + "output" : "Ringo, George, Paul, John" + },{ + "name" : "size_string", + "focus" : "Patient/example", + "template" : "{{ \"Ground control to Major Tom.\" || size }}", + "output" : "28" + },{ + "name" : "size_array", + "focus" : "Patient/example", + "template" : "{{ \"John, Paul, George, Ringo\" || split: \", \" || size }}", + "output" : "4" + },{ + "name" : "sort", + "focus" : "Patient/example", + "template" : "{{ \"zebra, octopus, giraffe, Sally Snake\" || split: \", \" || sort || join: \", \" }}", + "output" : "Sally Snake, giraffe, octopus, zebra" + },{ + "name" : "sort_natural", + "focus" : "Patient/example", + "template" : "{{ \"zebra, octopus, giraffe, Sally Snake\" || split: \", \" || sort_natural || join: \", \" }}", + "output" : "giraffe, octopus, Sally Snake, zebra" + },{ + "name" : "uniq", + "focus" : "Patient/example", + "template" : "{{ \"ants, bugs, bees, bugs, ants\" || split: \", \" || uniq || join: \", \" }}", + "output" : "ants, bugs, bees" + },{ + "name" : "compact", + "focus" : "Patient/example", + "template" : "{{ \"a,,b,,c\" || split: \",\" || compact || join: \", \" }}", + "output" : "a, b, c" + },{ + "name" : "concat", + "focus" : "Patient/example", + "template" : "{% assign fruits = \"apples, oranges\" || split: \", \" %}{% assign vegetables = \"carrots, turnips\" || split: \", \" %}{% assign everything = fruits || concat: vegetables %}{{ everything || join: \", \" }}", + "output" : "apples, oranges, carrots, turnips" + },{ + "name" : "sum", + "focus" : "Patient/example", + "template" : "{{ \"1,2,3\" || split: \",\" || sum }}", + "output" : "6" + },{ + "name" : "default1", + "focus" : "Patient/example", + "template" : "{{ \"\" || default: \"default value\" }}", + "output" : "default value" + },{ + "name" : "default2", + "focus" : "Patient/example", + "template" : "{{ \"hello\" || default: \"default value\" }}", + "output" : "hello" + },{ + "name" : "json", + "focus" : "Patient/example", + "template" : "{{ \"hello world\" || json }}", + "output" : "\"hello world\"" + },{ + "name" : "split1", + "focus" : "Patient/example", + "template" : "{{ \"Hi, how are you today?\" || split: \" \" || size }}", + "output" : "5" + },{ + "name" : "slice_neg_single", + "focus" : "Patient/example", + "template" : "{{ \"Liquid\" || slice: -3 }}", + "output" : "u" + },{ + "name" : "strip_html2", + "focus" : "Patient/example", + "template" : "{{ \"text\" || strip_html }}", + "output" : "alert('hi')text" + },{ + "name" : "truncate_noop", + "focus" : "Patient/example", + "template" : "{{ \"Hi\" || truncate: 20 }}", + "output" : "Hi" + },{ + "name" : "escape2", + "focus" : "Patient/example", + "template" : "{{ \"

test

\" || escape }}", + "output" : "<p>test</p>" + },{ + "name" : "append_chain", + "focus" : "Patient/example", + "template" : "{{ \"liq\" || append: \"uid\" }}", + "output" : "liquid" + },{ + "name" : "base64_roundtrip", + "focus" : "Patient/example", + "template" : "{{ \"abc\" || base64_encode || base64_decode }}", + "output" : "abc" + },{ + "name" : "plus_float", + "focus" : "Patient/example", + "template" : "{{ \"183.357\" || plus: 12.5 }}", + "output" : "195.857" + },{ + "name" : "minus_negative", + "focus" : "Patient/example", + "template" : "{{ \"4\" || minus: 6 }}", + "output" : "-2" + },{ + "name" : "divided_by_float_result", + "focus" : "Patient/example", + "template" : "{{ \"20\" || divided_by: 7 }}", + "output" : "2" + },{ + "name" : "times_float", + "focus" : "Patient/example", + "template" : "{{ \"5\" || times: 1.1 }}", + "output" : "5.5" + },{ + "name" : "round4", + "focus" : "Patient/example", + "template" : "{{ \"1.5\" || round }}", + "output" : "2" + },{ + "name" : "size_empty", + "focus" : "Patient/example", + "template" : "{{ \"\" || size }}", + "output" : "0" + },{ + "name" : "reverse_string", + "focus" : "Patient/example", + "template" : "{{ \"abc\" || split: \"\" || reverse || join: \"\" }}", + "output" : "cba" + },{ + "name" : "json_special", + "focus" : "Patient/example", + "template" : "{{ \"hello \\\"world\\\"\" || json }}", + "output" : "\"hello \\\"world\\\"\"" + },{ + "name" : "downcase_upcase_chain", + "focus" : "Patient/example", + "template" : "{{ \"Parker Moore\" || downcase || upcase }}", + "output" : "PARKER MOORE" + },{ + "name" : "strip_prepend", + "focus" : "Patient/example", + "template" : "{{ \" hello \" || strip || prepend: \"[\" || append: \"]\" }}", + "output" : "[hello]" + } + ] } From e7079bf3d3f7cb3d56ec499d118e45b2652960f1 Mon Sep 17 00:00:00 2001 From: Lloyd McKenzie Date: Sun, 19 Apr 2026 21:46:29 -0600 Subject: [PATCH 3/5] Added additional checks for HTMLChecks changes --- r5/fhirpath/tests-fhir-r5.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/r5/fhirpath/tests-fhir-r5.xml b/r5/fhirpath/tests-fhir-r5.xml index 33688de9..2195188b 100644 --- a/r5/fhirpath/tests-fhir-r5.xml +++ b/r5/fhirpath/tests-fhir-r5.xml @@ -1782,4 +1782,11 @@ Any text enclosed within is ignored %terminologies.validateVS('http://hl7.org/fhir/ValueSet/administrative-gender', $this.gender).parameter.where(name = 'result').valuetrue %terminologies.translate('http://hl7.org/fhir/ConceptMap/cm-address-use-v2', $this.address.use).parameter.where(name = 'match').part.where(name = 'concept').value.codeH + + + text.div.htmlChecks()true + %resource.parameter.where(name='goodHtml').value.htmlChecks()true + %resource.parameter.where(name='badHtml').value.htmlChecks()false + %resource.parameter.where(name='notString').value.htmlChecks().empty()true + From f07a05ac04055b193faf5e9aabf6a17ac69d200a Mon Sep 17 00:00:00 2001 From: Lloyd McKenzie Date: Mon, 20 Apr 2026 13:55:41 -0600 Subject: [PATCH 4/5] Added missing file --- r5/parameters-example-html.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 r5/parameters-example-html.xml diff --git a/r5/parameters-example-html.xml b/r5/parameters-example-html.xml new file mode 100644 index 00000000..6db9565e --- /dev/null +++ b/r5/parameters-example-html.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + From 97bffc6e40dccef9516be20dc69d04b7bdd94950 Mon Sep 17 00:00:00 2001 From: Lloyd McKenzie Date: Mon, 20 Apr 2026 17:04:05 -0600 Subject: [PATCH 5/5] Revert "New Liquid test cases" This reverts commit be1a123b37eb0df7cad56625f23c3ca83cfc4234. --- r5/liquid/liquid-tests.json | 528 +----------------------------------- 1 file changed, 1 insertion(+), 527 deletions(-) diff --git a/r5/liquid/liquid-tests.json b/r5/liquid/liquid-tests.json index 3055ea5a..7900395b 100644 --- a/r5/liquid/liquid-tests.json +++ b/r5/liquid/liquid-tests.json @@ -95,11 +95,6 @@ "focus" : "Patient/example", "template" : "{%for telecom in Patient.telecom reversed%}{{telecom.use}}{%endfor%}", "output" : "oldmobileworkhome" - },{ - "name" : "forsplit", - "focus" : "Patient/example", - "template" : "{% assign l = 'a,b,c' || split: ',' %}{%for s in l %}{{s}}{%endfor%}", - "output" : "abc" },{ "name" : "assign1", "focus" : "Patient/example", @@ -115,526 +110,5 @@ "focus" : "Patient/example", "template" : "{% capture my_variable %}false{%endcapture%}{% if my_variable != true %}This statement is valid.{% endif %}", "output" : "This statement is valid." - },{ - "name" : "upcase", - "focus" : "Patient/example", - "template" : "{{ \"Parker Moore\" || upcase }}", - "output" : "PARKER MOORE" - },{ - "name" : "downcase", - "focus" : "Patient/example", - "template" : "{{ \"Parker Moore\" || downcase }}", - "output" : "parker moore" - },{ - "name" : "capitalize", - "focus" : "Patient/example", - "template" : "{{ \"my GREAT title\" || capitalize }}", - "output" : "My great title" - },{ - "name" : "replace", - "focus" : "Patient/example", - "template" : "{{ \"Take my protein pills and put my helmet on\" || replace: \"my\", \"your\" }}", - "output" : "Take your protein pills and put your helmet on" - },{ - "name" : "replace_first", - "focus" : "Patient/example", - "template" : "{{ \"Take my protein pills and put my helmet on\" || replace_first: \"my\", \"your\" }}", - "output" : "Take your protein pills and put my helmet on" - },{ - "name" : "replace_last", - "focus" : "Patient/example", - "template" : "{{ \"Take my protein pills and put my helmet on\" || replace_last: \"my\", \"your\" }}", - "output" : "Take my protein pills and put your helmet on" - },{ - "name" : "remove", - "focus" : "Patient/example", - "template" : "{{ \"I strained to see the train through the rain\" || remove: \"rain\" }}", - "output" : "I sted to see the t through the " - },{ - "name" : "remove_first", - "focus" : "Patient/example", - "template" : "{{ \"I strained to see the train through the rain\" || remove_first: \"rain\" }}", - "output" : "I sted to see the train through the rain" - },{ - "name" : "remove_last", - "focus" : "Patient/example", - "template" : "{{ \"I strained to see the train through the rain\" || remove_last: \"rain\" }}", - "output" : "I strained to see the train through the " - },{ - "name" : "date1", - "focus" : "Patient/example", - "template" : "{{ \"2015-07-17\" || date: \"%a, %b %d, %y\" }}", - "output" : "Fri, Jul 17, 15" - },{ - "name" : "date2", - "focus" : "Patient/example", - "template" : "{{ \"2015-07-17\" || date: \"%Y\" }}", - "output" : "2015" - },{ - "name" : "date3", - "focus" : "Patient/example", - "template" : "{{ \"2016-03-14\" || date: \"%b %d, %y\" }}", - "output" : "Mar 14, 16" - },{ - "name" : "date4", - "focus" : "Patient/example", - "template" : "{{ \"2015-07-17T00:46:00Z\" || date: \"%Y-%m-%d %H:%M\" }}", - "output" : "2015-07-17 00:46" - },{ - "name" : "date5", - "focus" : "Patient/example", - "template" : "{{ \"July 3, 2002\" || date: \"%Y-%m-%d\" }}", - "output" : "2002-07-03" - },{ - "name" : "date", - "focus" : "Patient/example", - "template" : "{{ \"7-3-02\" || date: \"%Y-%m-%d\" }}", - "output" : "2002-07-03" - },{ - "name" : "append", - "focus" : "Patient/example", - "template" : "{{ \"/my/fancy/url\" || append: \".html\" }}", - "output" : "/my/fancy/url.html" - },{ - "name" : "append2", - "focus" : "Patient/example", - "template" : "{{ \"Adam\" || append: \"!\" }}", - "output" : "Adam!" - },{ - "name" : "base64_encode", - "focus" : "Patient/example", - "template" : "{{ \"one two three\" || base64_encode }}", - "output" : "b25lIHR3byB0aHJlZQ==" - },{ - "name" : "base64_decode", - "focus" : "Patient/example", - "template" : "{{ \"b25lIHR3byB0aHJlZQ==\" || base64_decode }}", - "output" : "one two three" - },{ - "name" : "escape", - "focus" : "Patient/example", - "template" : "{{ \"Have you read 'James & the Giant Peach'?\" || escape }}", - "output" : "Have you read 'James & the Giant Peach'?" - },{ - "name" : "escape_once", - "focus" : "Patient/example", - "template" : "{{ \"1 < 2 & 3\" || escape_once }}", - "output" : "1 < 2 & 3" - },{ - "name" : "lstrip", - "focus" : "Patient/example", - "template" : "{{ \" So much room for activities! \" || lstrip }}", - "output" : "So much room for activities! " - },{ - "name" : "rstrip", - "focus" : "Patient/example", - "template" : "{{ \" So much room for activities! \" || rstrip }}", - "output" : " So much room for activities!" - },{ - "name" : "strip", - "focus" : "Patient/example", - "template" : "{{ \" So much room for activities! \" || strip }}", - "output" : "So much room for activities!" - },{ - "name" : "newline_to_br", - "focus" : "Patient/example", - "template" : "{{ \"Hello\nWorld\" || newline_to_br }}", - "output" : "Hello
\nWorld" - },{ - "name" : "slice1", - "focus" : "Patient/example", - "template" : "{{ \"Liquid\" || slice: 0 }}", - "output" : "L" - },{ - "name" : "slice2", - "focus" : "Patient/example", - "template" : "{{ \"Liquid\" || slice: 2 }}", - "output" : "q" - },{ - "name" : "slice3", - "focus" : "Patient/example", - "template" : "{{ \"Liquid\" || slice: 2, 5 }}", - "output" : "quid" - },{ - "name" : "slice_negative", - "focus" : "Patient/example", - "template" : "{{ \"Liquid\" || slice: -3, 2 }}", - "output" : "ui" - },{ - "name" : "strip_html", - "focus" : "Patient/example", - "template" : "{{ \"Have you read Erta?\" || strip_html }}", - "output" : "Have you read Erta?" - },{ - "name" : "strip_newlines", - "focus" : "Patient/example", - "template" : "{{ \"Hello\nthere\" || strip_newlines }}", - "output" : "Hellothere" - },{ - "name" : "truncate1", - "focus" : "Patient/example", - "template" : "{{ \"Ground control to Major Tom.\" || truncate: 20 }}", - "output" : "Ground control to..." - },{ - "name" : "truncate2", - "focus" : "Patient/example", - "template" : "{{ \"Ground control to Major Tom.\" || truncate: 25, \", and so on\" }}", - "output" : "Ground control, and so on" - },{ - "name" : "truncate3", - "focus" : "Patient/example", - "template" : "{{ \"Ground control to Major Tom.\" || truncate: 20, \"\" }}", - "output" : "Ground control to Ma" - },{ - "name" : "truncatewords1", - "focus" : "Patient/example", - "template" : "{{ \"Ground control to Major Tom.\" || truncatewords: 3 }}", - "output" : "Ground control to..." - },{ - "name" : "truncatewords2", - "focus" : "Patient/example", - "template" : "{{ \"Ground control to Major Tom.\" || truncatewords: 3, \"---\" }}", - "output" : "Ground control to---" - },{ - "name" : "truncatewords3", - "focus" : "Patient/example", - "template" : "{{ \"Ground control to Major Tom.\" || truncatewords: 3, \"\" }}", - "output" : "Ground control to" - },{ - "name" : "url_encode", - "focus" : "Patient/example", - "template" : "{{ \"john@liquid.com\" || url_encode }}", - "output" : "john%40liquid.com" - },{ - "name" : "url_encode2", - "focus" : "Patient/example", - "template" : "{{ \"Tetsuro Takara\" || url_encode }}", - "output" : "Tetsuro+Takara" - },{ - "name" : "url_decode", - "focus" : "Patient/example", - "template" : "{{ \"%27Stop%21%27+said+Fred\" || url_decode }}", - "output" : "'Stop!' said Fred" - },{ - "name" : "url_decode2", - "focus" : "Patient/example", - "template" : "{{ \"rain+100%25\" || url_decode }}", - "output" : "rain 100%" - },{ - "name" : "abs1", - "focus" : "Patient/example", - "template" : "{{ \"-17\" || abs }}", - "output" : "17" - },{ - "name" : "abs2", - "focus" : "Patient/example", - "template" : "{{ \"4\" || abs }}", - "output" : "4" - },{ - "name" : "abs3", - "focus" : "Patient/example", - "template" : "{{ \"-19.86\" || abs }}", - "output" : "19.86" - },{ - "name" : "at_least1", - "focus" : "Patient/example", - "template" : "{{ \"4\" || at_least: 5 }}", - "output" : "5" - },{ - "name" : "at_least2", - "focus" : "Patient/example", - "template" : "{{ \"4\" || at_least: 3 }}", - "output" : "4" - },{ - "name" : "at_most1", - "focus" : "Patient/example", - "template" : "{{ \"4\" || at_most: 5 }}", - "output" : "4" - },{ - "name" : "at_most2", - "focus" : "Patient/example", - "template" : "{{ \"4\" || at_most: 3 }}", - "output" : "3" - },{ - "name" : "ceil1", - "focus" : "Patient/example", - "template" : "{{ \"1.2\" || ceil }}", - "output" : "2" - },{ - "name" : "ceil2", - "focus" : "Patient/example", - "template" : "{{ \"2.0\" || ceil }}", - "output" : "2" - },{ - "name" : "ceil3", - "focus" : "Patient/example", - "template" : "{{ \"183.357\" || ceil }}", - "output" : "184" - },{ - "name" : "divided_by1", - "focus" : "Patient/example", - "template" : "{{ \"16\" || divided_by: 4 }}", - "output" : "4" - },{ - "name" : "divided_by2", - "focus" : "Patient/example", - "template" : "{{ \"5\" || divided_by: 3 }}", - "output" : "1" - },{ - "name" : "divided_by3", - "focus" : "Patient/example", - "template" : "{{ \"20\" || divided_by: 7.0 }}", - "output" : "2.857142857142857" - },{ - "name" : "floor1", - "focus" : "Patient/example", - "template" : "{{ \"1.2\" || floor }}", - "output" : "1" - },{ - "name" : "floor2", - "focus" : "Patient/example", - "template" : "{{ \"2.0\" || floor }}", - "output" : "2" - },{ - "name" : "floor3", - "focus" : "Patient/example", - "template" : "{{ \"183.357\" || floor }}", - "output" : "183" - },{ - "name" : "minus1", - "focus" : "Patient/example", - "template" : "{{ \"4\" || minus: 2 }}", - "output" : "2" - },{ - "name" : "minus2", - "focus" : "Patient/example", - "template" : "{{ \"16\" || minus: 4 }}", - "output" : "12" - },{ - "name" : "minus3", - "focus" : "Patient/example", - "template" : "{{ \"183.357\" || minus: 12 }}", - "output" : "171.357" - },{ - "name" : "modulo1", - "focus" : "Patient/example", - "template" : "{{ \"3\" || modulo: 2 }}", - "output" : "1" - },{ - "name" : "modulo2", - "focus" : "Patient/example", - "template" : "{{ \"24\" || modulo: 7 }}", - "output" : "3" - },{ - "name" : "modulo3", - "focus" : "Patient/example", - "template" : "{{ \"183.357\" || modulo: 12 }}", - "output" : "3.3569999999999993" - },{ - "name" : "plus1", - "focus" : "Patient/example", - "template" : "{{ \"4\" || plus: 2 }}", - "output" : "6" - },{ - "name" : "plus2", - "focus" : "Patient/example", - "template" : "{{ \"16\" || plus: 4 }}", - "output" : "20" - },{ - "name" : "plus3", - "focus" : "Patient/example", - "template" : "{{ \"183.357\" || plus: 12 }}", - "output" : "195.357" - },{ - "name" : "round1", - "focus" : "Patient/example", - "template" : "{{ \"1.2\" || round }}", - "output" : "1" - },{ - "name" : "round2", - "focus" : "Patient/example", - "template" : "{{ \"2.7\" || round }}", - "output" : "3" - },{ - "name" : "round3", - "focus" : "Patient/example", - "template" : "{{ \"183.357\" || round: 2 }}", - "output" : "183.36" - },{ - "name" : "times1", - "focus" : "Patient/example", - "template" : "{{ \"3\" || times: 2 }}", - "output" : "6" - },{ - "name" : "times2", - "focus" : "Patient/example", - "template" : "{{ \"24\" || times: 7 }}", - "output" : "168" - },{ - "name" : "times3", - "focus" : "Patient/example", - "template" : "{{ \"183.357\" || times: 12 }}", - "output" : "2200.284" - },{ - "name" : "first", - "focus" : "Patient/example", - "template" : "{{ \"John, Paul, George, Ringo\" || split: \", \" || first }}", - "output" : "John" - },{ - "name" : "last", - "focus" : "Patient/example", - "template" : "{{ \"John, Paul, George, Ringo\" || split: \", \" || last }}", - "output" : "Ringo" - },{ - "name" : "join", - "focus" : "Patient/example", - "template" : "{{ \"John, Paul, George, Ringo\" || split: \", \" || join: \" and \" }}", - "output" : "John and Paul and George and Ringo" - },{ - "name" : "reverse", - "focus" : "Patient/example", - "template" : "{{ \"John, Paul, George, Ringo\" || split: \", \" || reverse || join: \", \" }}", - "output" : "Ringo, George, Paul, John" - },{ - "name" : "size_string", - "focus" : "Patient/example", - "template" : "{{ \"Ground control to Major Tom.\" || size }}", - "output" : "28" - },{ - "name" : "size_array", - "focus" : "Patient/example", - "template" : "{{ \"John, Paul, George, Ringo\" || split: \", \" || size }}", - "output" : "4" - },{ - "name" : "sort", - "focus" : "Patient/example", - "template" : "{{ \"zebra, octopus, giraffe, Sally Snake\" || split: \", \" || sort || join: \", \" }}", - "output" : "Sally Snake, giraffe, octopus, zebra" - },{ - "name" : "sort_natural", - "focus" : "Patient/example", - "template" : "{{ \"zebra, octopus, giraffe, Sally Snake\" || split: \", \" || sort_natural || join: \", \" }}", - "output" : "giraffe, octopus, Sally Snake, zebra" - },{ - "name" : "uniq", - "focus" : "Patient/example", - "template" : "{{ \"ants, bugs, bees, bugs, ants\" || split: \", \" || uniq || join: \", \" }}", - "output" : "ants, bugs, bees" - },{ - "name" : "compact", - "focus" : "Patient/example", - "template" : "{{ \"a,,b,,c\" || split: \",\" || compact || join: \", \" }}", - "output" : "a, b, c" - },{ - "name" : "concat", - "focus" : "Patient/example", - "template" : "{% assign fruits = \"apples, oranges\" || split: \", \" %}{% assign vegetables = \"carrots, turnips\" || split: \", \" %}{% assign everything = fruits || concat: vegetables %}{{ everything || join: \", \" }}", - "output" : "apples, oranges, carrots, turnips" - },{ - "name" : "sum", - "focus" : "Patient/example", - "template" : "{{ \"1,2,3\" || split: \",\" || sum }}", - "output" : "6" - },{ - "name" : "default1", - "focus" : "Patient/example", - "template" : "{{ \"\" || default: \"default value\" }}", - "output" : "default value" - },{ - "name" : "default2", - "focus" : "Patient/example", - "template" : "{{ \"hello\" || default: \"default value\" }}", - "output" : "hello" - },{ - "name" : "json", - "focus" : "Patient/example", - "template" : "{{ \"hello world\" || json }}", - "output" : "\"hello world\"" - },{ - "name" : "split1", - "focus" : "Patient/example", - "template" : "{{ \"Hi, how are you today?\" || split: \" \" || size }}", - "output" : "5" - },{ - "name" : "slice_neg_single", - "focus" : "Patient/example", - "template" : "{{ \"Liquid\" || slice: -3 }}", - "output" : "u" - },{ - "name" : "strip_html2", - "focus" : "Patient/example", - "template" : "{{ \"text\" || strip_html }}", - "output" : "alert('hi')text" - },{ - "name" : "truncate_noop", - "focus" : "Patient/example", - "template" : "{{ \"Hi\" || truncate: 20 }}", - "output" : "Hi" - },{ - "name" : "escape2", - "focus" : "Patient/example", - "template" : "{{ \"

test

\" || escape }}", - "output" : "<p>test</p>" - },{ - "name" : "append_chain", - "focus" : "Patient/example", - "template" : "{{ \"liq\" || append: \"uid\" }}", - "output" : "liquid" - },{ - "name" : "base64_roundtrip", - "focus" : "Patient/example", - "template" : "{{ \"abc\" || base64_encode || base64_decode }}", - "output" : "abc" - },{ - "name" : "plus_float", - "focus" : "Patient/example", - "template" : "{{ \"183.357\" || plus: 12.5 }}", - "output" : "195.857" - },{ - "name" : "minus_negative", - "focus" : "Patient/example", - "template" : "{{ \"4\" || minus: 6 }}", - "output" : "-2" - },{ - "name" : "divided_by_float_result", - "focus" : "Patient/example", - "template" : "{{ \"20\" || divided_by: 7 }}", - "output" : "2" - },{ - "name" : "times_float", - "focus" : "Patient/example", - "template" : "{{ \"5\" || times: 1.1 }}", - "output" : "5.5" - },{ - "name" : "round4", - "focus" : "Patient/example", - "template" : "{{ \"1.5\" || round }}", - "output" : "2" - },{ - "name" : "size_empty", - "focus" : "Patient/example", - "template" : "{{ \"\" || size }}", - "output" : "0" - },{ - "name" : "reverse_string", - "focus" : "Patient/example", - "template" : "{{ \"abc\" || split: \"\" || reverse || join: \"\" }}", - "output" : "cba" - },{ - "name" : "json_special", - "focus" : "Patient/example", - "template" : "{{ \"hello \\\"world\\\"\" || json }}", - "output" : "\"hello \\\"world\\\"\"" - },{ - "name" : "downcase_upcase_chain", - "focus" : "Patient/example", - "template" : "{{ \"Parker Moore\" || downcase || upcase }}", - "output" : "PARKER MOORE" - },{ - "name" : "strip_prepend", - "focus" : "Patient/example", - "template" : "{{ \" hello \" || strip || prepend: \"[\" || append: \"]\" }}", - "output" : "[hello]" - } - ] + }] }