From: Sergey Matveev Date: Mon, 25 May 2020 13:43:06 +0000 (+0300) Subject: URLize notes X-Git-Tag: v0.6.2^0 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=d69e0371154b4466d875b38805caff1c3bb497c2;hp=cfe593c6615455c961f85a947b257f7c27553f6c;p=sgblog.git URLize notes --- diff --git a/cmd/sgblog/http.go b/cmd/sgblog/http.go index 1c09ae0..85359b3 100644 --- a/cmd/sgblog/http.go +++ b/cmd/sgblog/http.go @@ -642,7 +642,11 @@ func serveHTTP() { } out.Write([]byte("\n
\n")) if len(notesRaw) > 0 { - out.Write([]byte("Note:
\n" + string(notesRaw) + "\n
\n
\n")) + out.Write([]byte("Note:
\n"))
+			for _, line := range strings.Split(string(notesRaw), "\n") {
+				out.Write([]byte(lineURLize(cfg.URLPrefix, line) + "\n"))
+			}
+			out.Write([]byte("
\n
\n")) } if cfg.CommentsEmail != "" { out.Write([]byte("[" + makeA( diff --git a/common.go b/common.go index 4e74ca0..3fa5cec 100644 --- a/common.go +++ b/common.go @@ -2,6 +2,6 @@ package sgblog const ( - Version = "0.6.1" + Version = "0.6.2" WhenFmt = "2006-01-02 15:04:05Z07:00" )