From f164d510d82ddf2946f9c52257fe15547c474ee6 Mon Sep 17 00:00:00 2001 From: Raymonzut Date: Thu, 17 Feb 2022 09:42:44 +0100 Subject: [PATCH] Allow multiple handlebars on one line - As the HyperLisp will put most on the same line Signed-off-by: Raymonzut --- client/gen.exs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/gen.exs b/client/gen.exs index f9a5baf..5c160f8 100644 --- a/client/gen.exs +++ b/client/gen.exs @@ -7,8 +7,8 @@ post_feed_template = File.read!("./templates/posts.xml") # Converting handlebars in template to values fill_template = fn template, pairs -> - Regex.compile!("{{(.*)}}") |> - Regex.replace(template, fn _, key -> Map.get(pairs, String.to_atom(key)) end) + ~r/{{(.*)}}/U + |> Regex.replace(template, fn _, key -> Map.get(pairs, String.to_atom(key)) end) end fill_template_pretemplated = fn template -> &fill_template.(template, &1) end