consistently process precis as html.
only do the markdown conversion once and early.
This commit is contained in:
parent
ed13b68989
commit
65face4f35
|
@ -1290,7 +1290,7 @@ func jonkjonk(user *WhatAbout, h *Honk) (junk.Junk, junk.Junk) {
|
|||
if len(atts) > 0 {
|
||||
jo["attachment"] = atts
|
||||
}
|
||||
jo["summary"] = html.EscapeString(h.Precis)
|
||||
jo["summary"] = h.Precis
|
||||
jo["content"] = h.Noise
|
||||
j["object"] = jo
|
||||
case "bonk":
|
||||
|
|
13
fun.go
13
fun.go
|
@ -289,10 +289,7 @@ func imaginate(honk *Honk) {
|
|||
|
||||
var re_dangerous = regexp.MustCompile("^[a-zA-Z]{2}:")
|
||||
|
||||
func translate(honk *Honk) {
|
||||
if honk.Format == "html" {
|
||||
return
|
||||
}
|
||||
func precipitate(honk *Honk) {
|
||||
noise := honk.Noise
|
||||
if re_dangerous.MatchString(noise) {
|
||||
idx := strings.Index(noise, "\n")
|
||||
|
@ -305,6 +302,14 @@ func translate(honk *Honk) {
|
|||
}
|
||||
}
|
||||
honk.Precis = markitzero(strings.TrimSpace(honk.Precis))
|
||||
honk.Noise = noise
|
||||
}
|
||||
|
||||
func translate(honk *Honk) {
|
||||
if honk.Format == "html" {
|
||||
return
|
||||
}
|
||||
noise := honk.Noise
|
||||
|
||||
var marker mz.Marker
|
||||
marker.HashLinker = ontoreplacer
|
||||
|
|
Loading…
Reference in New Issue