From 58f5c3edf7852171d6dd0068c4f602cf7e734239 Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Sat, 26 Aug 2023 22:59:22 +1200 Subject: [PATCH] m->d underline formatting support --- m2d/converters/event-to-message.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/m2d/converters/event-to-message.js b/m2d/converters/event-to-message.js index f5d3c90..d6daed7 100644 --- a/m2d/converters/event-to-message.js +++ b/m2d/converters/event-to-message.js @@ -37,6 +37,13 @@ turndownService.addRule("strikethrough", { } }) +turndownService.addRule("underline", { + filter: ["u"], + replacement: function (content) { + return "__" + content + "__" + } +}) + turndownService.addRule("blockquote", { filter: "blockquote", replacement: function (content) {