From 1d3689b7cf9d670668c1fbcb9972327d238f05e1 Mon Sep 17 00:00:00 2001 From: Valentyne Stigloher Date: Thu, 17 Apr 2025 00:39:35 +0200 Subject: [PATCH] (blog) fix wrong text-align on convert deprecated align attribute to inline css modern markdown parsers appear to do this --- src/parseMarkdown.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/parseMarkdown.ts b/src/parseMarkdown.ts index 2957c3888..345331076 100644 --- a/src/parseMarkdown.ts +++ b/src/parseMarkdown.ts @@ -111,6 +111,7 @@ export default async function parseMarkdown(markdown: string, translator: Transl let content = `
${ markdown .replace(/(.+?)<\/table>/gs, '
$1
') + .replace(/align="([^"]+)"/g, 'style="text-align:$1"') .replace(/`; })