Re-add preformatted alt text
alex wennerberg alex@alexwennerberg.com
Mon, 09 Nov 2020 10:05:03 -0800
1 files changed,
5 insertions(+),
0 deletions(-)
jump to
M
gmi2html.go
→
gmi2html.go
@@ -34,6 +34,11 @@ fmt.Fprintf(&b, "<p><a href='%s'>%s</a></p>\n", url, name)
case gemini.LinePreformattingToggle: pre = !pre if pre { + altText := string(l.(gemini.LinePreformattingToggle)) + if altText != "" { + altText = html.EscapeString(altText) + fmt.Fprintf(&b, "<pre title='%s'>\n", altText) + } fmt.Fprint(&b, "<pre>\n") } else { fmt.Fprint(&b, "</pre>\n")