Fix indentation in meta content tag

Most preview applications render this as html,
which will strip repeated spaces.
By instead emitting  , we can retain the indentation.

Groups of two spaces are replaced with two nbsp because single spaces
(i.e. gaps between words) should still be breaking.
This commit is contained in:
kageru 2020-05-27 14:27:31 +02:00
parent 6cb30eb8bf
commit 726a25bed7
Signed by: kageru
GPG Key ID: 8282A2BEA4ADA3D2

@ -14,7 +14,7 @@ object PastePage {
) )
script(src = "/static/hl.js") {} script(src = "/static/hl.js") {}
// Show the first 3 lines in preview/embed for applications like discord, slack, or skype // Show the first 3 lines in preview/embed for applications like discord, slack, or skype
meta(content = content.lines().take(3).joinToString("\n")) { meta(content = content.lines().take(3).joinToString("\n").replace(" ", "  ")) {
attributes["property"] = "og:description" attributes["property"] = "og:description"
} }
unsafe { unsafe {