Allow multiple handlebars on one line
- As the HyperLisp will put most on the same line Signed-off-by: Raymonzut <me@raymon.dev>
This commit is contained in:
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user