Try to hint reader mode better.

Line breaks in the imageboard parser now use an empty paragraph tag
to try to hint that the page should use reader mode.
This commit is contained in:
Robin Malley 2021-04-09 20:03:24 +00:00
parent 7cc5e8d0ef
commit e5d1904b1f
2 changed files with 2 additions and 1 deletions

View File

@ -9,6 +9,7 @@ body{
} }
h1,h2,h3{line-height:1.2} h1,h2,h3{line-height:1.2}
p,.tag-list{margin-bottom:0px} p,.tag-list{margin-bottom:0px}
.spacer{margin-bottom:1em}
.spoiler,.spoiler2{background:#444} .spoiler,.spoiler2{background:#444}
.spoiler:hover,.spoiler2:hover{color:#FFF} .spoiler:hover,.spoiler2:hover{color:#FFF}
.greentext{color:#282} .greentext{color:#282}

View File

@ -99,7 +99,7 @@ local grammar = P{
plainline = (V"marked" + word)^0, plainline = (V"marked" + word)^0,
line = Cs(V"greentext" + V"pinktext" + V"plainline" + P"") * P"\n" / function(a) line = Cs(V"greentext" + V"pinktext" + V"plainline" + P"") * P"\n" / function(a)
if a == "\r" then if a == "\r" then
return "<br/>" return [[<p class="spacer"></p>]]
else else
return string.format("<p>%s</p>",a) return string.format("<p>%s</p>",a)
end end