if content doesn't start with <p>, make it so

This commit is contained in:
Ted Unangst 2019-04-22 15:05:44 -04:00
parent 99abc6a0e9
commit 4e9987abca
1 changed files with 3 additions and 0 deletions

View File

@ -440,6 +440,9 @@ func xonkxonk(item interface{}) *Honk {
xid, _ = jsongetstring(obj, "id")
content, _ = jsongetstring(obj, "content")
summary, _ := jsongetstring(obj, "summary")
if !strings.HasPrefix(content, "<p>") {
content = "<p>" + content
}
if summary != "" {
content = "<p>summary: " + summary + content
}