[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
This commit is contained in:
Norwin
2022-11-22 11:08:50 +01:00
committed by GitHub
parent b153808472
commit f88cb3aebc
2 changed files with 17 additions and 6 deletions

View File

@@ -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,
}),
}