From f2d926b78cda68e8b31e2e1b5f972e1cc8a00434 Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer Date: Wed, 16 Nov 2022 06:50:41 +0100 Subject: [PATCH] fix(templates): append remaining property on return resolves #3085 --- src/template/text.go | 3 ++- src/template/text_test.go | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/template/text.go b/src/template/text.go index 749a56e6..6fd5423d 100644 --- a/src/template/text.go +++ b/src/template/text.go @@ -143,5 +143,6 @@ func (t *Text) cleanTemplate() { } } - t.Template = result + // return the result and remaining unresolved property + t.Template = result + property } diff --git a/src/template/text_test.go b/src/template/text_test.go index 7114c2b0..233d3d62 100644 --- a/src/template/text_test.go +++ b/src/template/text_test.go @@ -20,6 +20,11 @@ func TestRenderTemplate(t *testing.T) { ShouldError bool Context interface{} }{ + { + Case: "color override with dots", + Expected: "πŸ˜ΊπŸ’¬<#FF8000> Meow! What should I do next? ...", + Template: "πŸ˜ΊπŸ’¬<#FF8000> Meow! What should I do next? ...", + }, { Case: "tillig's regex", Expected: " ⎈ hello :: world ",