From e76a9ec8aa005b6694fa56f8146a2afc26ca84d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Tue, 18 Apr 2023 23:50:26 +0200 Subject: [PATCH] wip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- .../compose/editor/transformers/index.ts | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/app/soapbox/features/compose/editor/transformers/index.ts b/app/soapbox/features/compose/editor/transformers/index.ts index bc8dbee16..5266daadc 100644 --- a/app/soapbox/features/compose/editor/transformers/index.ts +++ b/app/soapbox/features/compose/editor/transformers/index.ts @@ -57,6 +57,28 @@ export const UNESCAPE_ITALIC_UNDERSCORE: TextMatchTransformer = { type: 'text-match', }; +const UNESCAPE_ITALIC_STAR_IMPORT_REGEX = + /([\*])(? null, + importRegExp: UNESCAPE_ITALIC_STAR_IMPORT_REGEX, + regExp: UNESCAPE_ITALIC_STAR_REGEX, + replace: (textNode, _) => { + const notEscapedStarRegex = /(?