Changeset

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
parents 4599:06c9c9ef0a51
children 4601:3c3f45241317
files mod_pubsub_summary/mod_pubsub_summary.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
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("<[^>]+>", "");