Fix styles a bit
alex wennerberg alex@alexwennerberg.com
Tue, 24 Nov 2020 11:24:49 -0800
2 files changed,
9 insertions(+),
7 deletions(-)
M
gmi2html.go
→
gmi2html.go
@@ -16,11 +16,11 @@ for _, l := range text {
if _, ok := l.(gemini.LineListItem); ok { if !list { list = true - fmt.Fprint(&b, "<ul>\n") + fmt.Fprint(&b, "<ul>") } } else if list { list = false - fmt.Fprint(&b, "</ul>\n") + fmt.Fprint(&b, "</ul>") } switch l.(type) { case gemini.LineLink:@@ -37,12 +37,12 @@ if pre {
altText := string(l.(gemini.LinePreformattingToggle)) if altText != "" { altText = html.EscapeString(altText) - fmt.Fprintf(&b, "<pre title='%s'>\n", altText) + fmt.Fprintf(&b, "<pre title='%s'>", altText) } else { fmt.Fprint(&b, "<pre>\n") } } else { - fmt.Fprint(&b, "</pre>\n") + fmt.Fprint(&b, "</pre>") } case gemini.LinePreformattedText: text := string(l.(gemini.LinePreformattedText))@@ -72,10 +72,10 @@ }
} } if pre { - fmt.Fprint(&b, "</pre>\n") + fmt.Fprint(&b, "</pre>") } if list { - fmt.Fprint(&b, "</ul>\n") + fmt.Fprint(&b, "</ul>") } return b.String() }
M
templates/static/style.css
→
templates/static/style.css
@@ -14,8 +14,10 @@ margin-bottom:.2em;
} .gemini { -white-space: pre-wrap; + white-space: pre-wrap; + line-height: 1.5; } + body { }