~adnano/gmnitohtml

1f37d4d8329ea50a70d461d922004098638cc508 — Adnan Maolood 3 years ago e3b1e37
Don't output empty paragraphs
1 files changed, 3 insertions(+), 1 deletions(-)

M main.go
M main.go => main.go +3 -1
@@ 106,7 106,9 @@ func (h *HTMLWriter) Handle(line gemini.Line) {
	case gemini.LineQuote:
		fmt.Fprintf(h.out, "<blockquote>%s</blockquote>\n", html.EscapeString(string(line)))
	case gemini.LineText:
		fmt.Fprintf(h.out, "<p>%s</p>\n", html.EscapeString(string(line)))
		if line != "" {
			fmt.Fprintf(h.out, "<p>%s</p>\n", html.EscapeString(string(line)))
		}
	}
}