1
0

Print raw HTML lines in mindflow.

This commit is contained in:
Alexander Andreev 2024-06-19 04:32:56 +04:00
parent 077a5ba612
commit c9cd434b59
Signed by: Arav
GPG Key ID: 25969B23DCB5CA34

View File

@ -28,9 +28,9 @@ templ Mindflow(posts []mindflow.Post, categories []mindflow.Category, r *http.Re
</header>
for _, line := range strings.Split(post.Body, "\n") {
if len(line) > 0 && line[0] == '>' {
<p class="quote">{ line }</p>
<p class="quote">@templ.Raw(line)</p>
} else {
<p>{ line }</p>
<p>@templ.Raw(line)</p>
}
}
<footer>