mirror of
https://github.com/aljazceru/njump.git
synced 2025-12-17 06:14:22 +01:00
Remove duplicate title inside the body
This commit is contained in:
@@ -125,6 +125,7 @@ func renderEvent(w http.ResponseWriter, r *http.Request) {
|
||||
for _, tag := range data.event.Tags {
|
||||
if tag[0] == "subject" || tag[0] == "title" {
|
||||
subject = tag[1]
|
||||
|
||||
}
|
||||
if tag[0] == "summary" {
|
||||
summary = tag[1]
|
||||
@@ -264,6 +265,8 @@ func renderEvent(w http.ResponseWriter, r *http.Request) {
|
||||
data.content = strings.ReplaceAll(data.content, placeholderTag, "nostr:"+nreplace)
|
||||
}
|
||||
if data.event.Kind == 30023 || data.event.Kind == 30024 {
|
||||
// Remove duplicate title inside the body
|
||||
data.content = strings.ReplaceAll(data.content, "# "+subject, "")
|
||||
data.content = mdToHTML(data.content, data.templateId == TelegramInstantView, false)
|
||||
} else {
|
||||
// first we run basicFormatting, which turns URLs into their appropriate HTML tags
|
||||
|
||||
Reference in New Issue
Block a user