flounder

A simple gemini site builder
Log | Files | Refs | README | LICENSE

commit cbb04214d323a3fc4e0d562ef60fb08737ba6e28
parent fe128dfe1438dd8da1e03851f6b77a938665d7ea
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Mon,  9 Nov 2020 10:05:03 -0800

Re-add preformatted alt text

Diffstat:
Mgmi2html.go | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/gmi2html.go b/gmi2html.go @@ -34,6 +34,11 @@ func textToHTML(text gemini.Text) string { 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")