better handling of name, summary, content
Ted Unangst tedu@tedunangst.com
Sun, 12 Jan 2020 01:43:31 -0500
1 files changed,
6 insertions(+),
6 deletions(-)
jump to
M
activity.go
→
activity.go
@@ -656,16 +656,16 @@ if dt2, ok := obj.GetString("published"); ok {
dt = dt2 } xid, _ = obj.GetString("id") + content, _ = obj.GetString("content") + if !strings.HasPrefix(content, "<p>") { + content = "<p>" + content + } precis, _ = obj.GetString("summary") if name, ok := obj.GetString("name"); ok { if precis != "" { - precis = "\n" + precis + content = precis + "<p>" + content } - precis = name + precis - } - content, _ = obj.GetString("content") - if !strings.HasPrefix(content, "<p>") { - content = "<p>" + content + precis = name } if sens, _ := obj["sensitive"].(bool); sens && precis == "" { precis = "unspecified horror"