all repos — vite @ 3e51c35d6f1cc825bcf75a0760ee2072bdef8cf5

a fast (this time, actually) and minimal static site generator

markdown.go (view raw)

 1package main
 2
 3import (
 4	bf "github.com/russross/blackfriday/v2"
 5)
 6
 7var bfFlags = bf.UseXHTML | bf.Smartypants | bf.SmartypantsFractions |
 8	bf.SmartypantsDashes | bf.SmartypantsAngledQuotes | bf.NofollowLinks |
 9	bf.FootnoteReturnLinks
10
11func mdRender(input []byte) []byte {
12	return bf.Run(
13		input,
14		bf.WithRenderer(bf.NewHTMLRenderer(bf.HTMLRendererParameters{
15			Flags: bfFlags,
16		})),
17	)
18}