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:
parent
6cb30eb8bf
commit
726a25bed7
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user