I’m trying to replace Discord emoji codes with HTML, but I keep getting an invalid syntax error.
Rebuild failed:
Process: loading templates: “/home/ruby/Code/www/two.alliumvale.world/themes/alliumvale2/layouts/partials/announcements.html:10:1”: parse failed: template: partials/announcements.html:10: invalid syntax
<section id="announcements">
<div class="container">
<h1>Announcements</h1>
{{ range $.Site.Data.announcements }}
<article>
<header>
<div class="author">{{ .user }}</div>
<div class="date">{{ .date }}</div>
</header>
<p>{{ .message | replaceRE "<:(\w+):(\d+)>" `<img src="https://cdn.discordapp.com/emojis/$2.webp?size=44&quality=lossless" alt=":$1:">` }}</p>
</article>
{{ end }}
</div>
</section>