Mercurial > prosody-modules
comparison mod_pubsub_summary/mod_pubsub_summary.lua @ 4438:2bb11055e4bb
mod_pubsub_summary: Make titles *bold* to stand out more
Hard to see where each post starts in certain clients.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 10 Feb 2021 16:14:18 +0100 |
parents | 09657f758f53 |
children | 86a97e7572b2 |
comparison
equal
deleted
inserted
replaced
4437:09657f758f53 | 4438:2bb11055e4bb |
---|---|
30 nbsp = utf8 and utf8.char(0xa0) or " "; | 30 nbsp = utf8 and utf8.char(0xa0) or " "; |
31 }); | 31 }); |
32 end | 32 end |
33 local summary; | 33 local summary; |
34 if title and content and content:sub(1, #title) ~= title then | 34 if title and content and content:sub(1, #title) ~= title then |
35 summary = title .. "\n\n" .. content; | 35 summary = "*" .. title .. "*\n\n" .. content; |
36 elseif title or content then | 36 elseif title or content then |
37 summary = content or title; | 37 summary = content or title; |
38 end | 38 end |
39 for link in payload:childtags("link") do | 39 for link in payload:childtags("link") do |
40 if link and link.attr.href and link.attr.href ~= content then | 40 if link and link.attr.href and link.attr.href ~= content then |