From f88cb3aebc30f4c61171dc621b0cf576ea8c6b25 Mon Sep 17 00:00:00 2001 From: Norwin Date: Tue, 22 Nov 2022 11:08:50 +0100 Subject: [chore] markdown: disable Smartypants rendering (#1111) * [enhancement] markdown: disable SmartyPantsFractions fixes #1028 * some fractions are still converted to unicode to fix that, we might need to disable smartypants indeed in its entirety * disable smartypants completely for lack of a better simple solution --- internal/text/markdown.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'internal/text/markdown.go') diff --git a/internal/text/markdown.go b/internal/text/markdown.go index b512e3b0f..837f213e1 100644 --- a/internal/text/markdown.go +++ b/internal/text/markdown.go @@ -71,7 +71,9 @@ func (f *formatter) FromMarkdown(ctx context.Context, markdownText string, menti mentions: mentions, tags: tags, HTMLRenderer: *blackfriday.NewHTMLRenderer(blackfriday.HTMLRendererParameters{ - Flags: blackfriday.CommonHTMLFlags, + // same as blackfriday.CommonHTMLFlags, but with Smartypants disabled + // ref: https://github.com/superseriousbusiness/gotosocial/issues/1028 + Flags: blackfriday.UseXHTML, }), } -- cgit v1.2.3