Better markdown flags
Anirudh Oppiliappan x@icyphox.sh
Sun, 10 Apr 2022 13:20:11 +0530
1 files changed,
6 insertions(+),
2 deletions(-)
jump to
M
markdown/markdown.go
→
markdown/markdown.go
@@ -15,8 +15,11 @@ bf "github.com/russross/blackfriday/v2"
) var ( - bfFlags = bf.CommonHTMLFlags | bf.FootnoteReturnLinks | bf.SmartypantsFractions - bfExts = bf.CommonExtensions | bf.AutoHeadingIDs | bf.Footnotes | bf.NoEmptyLineBeforeBlock + bfFlags = bf.UseXHTML | bf.Smartypants | bf.SmartypantsFractions | + bf.SmartypantsDashes | bf.NofollowLinks | bf.FootnoteReturnLinks + bfExts = bf.NoIntraEmphasis | bf.Tables | bf.FencedCode | bf.Autolink | + bf.Strikethrough | bf.SpaceHeadings | bf.BackslashLineBreak | + bf.HeadingIDs | bf.Footnotes | bf.NoEmptyLineBeforeBlock ) type Output struct {@@ -33,6 +36,7 @@ }
out.HTML = bf.Run( md.Body, + bf.WithNoExtensions(), bf.WithRenderer( bfc.NewRenderer( bfc.ChromaOptions(