Software /
code /
prosody-modules
Diff
mod_pubsub_summary/mod_pubsub_summary.lua @ 4600:98864dffb231
mod_pubsub_summary: Fix conversion of emphasis _like this_ per XEP-0393
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 28 Jun 2021 04:12:47 +0200 |
parent | 4513:ade2064160e3 |
child | 4609:fcfe691d6322 |
line wrap: on
line diff
--- a/mod_pubsub_summary/mod_pubsub_summary.lua Fri Jun 25 15:12:46 2021 +0200 +++ b/mod_pubsub_summary/mod_pubsub_summary.lua Mon Jun 28 04:12:47 2021 +0200 @@ -14,8 +14,8 @@ content = content:gsub("<a[^>]*href=[\"'](.-)[\"'][^>]*>(.-)</a>", "\1%1\2%2\3"); content = content:gsub("<b>(.-)</b>", "*%1*"); content = content:gsub("<strong>(.-)</strong>", "*%1*"); - content = content:gsub("<em>(.-)</em>", "*%1*"); - content = content:gsub("<i>(.-)</i>", "*%1*"); + content = content:gsub("<em>(.-)</em>", "_%1_"); + content = content:gsub("<i>(.-)</i>", "_%1_"); content = content:gsub("<img[^>]*src=[\"'](.-)[\"'][^>]*>", " %1 "); -- TODO alt= would have been nice to grab content = content:gsub("<br[^>]*>", "\n"); content = content:gsub("<[^>]+>", "");