优化Markdown解析

pull/244/head
Minho 2018-03-25 21:18:54 +08:00
parent 970e77f71c
commit ffe5dced44
1 changed files with 5 additions and 1 deletions

View File

@ -620,7 +620,11 @@ func (book *Book) ImportBook(zipPath string) error {
return link
})
doc.Content = string(blackfriday.Run([]byte(doc.Markdown)))
doc.Content = string(blackfriday.Run([]byte(doc.Markdown),
blackfriday.WithExtensions(blackfriday.Tables),
blackfriday.WithExtensions(blackfriday.HeadingIDs),
blackfriday.WithExtensions(blackfriday.FencedCode),
blackfriday.WithExtensions(blackfriday.AutoHeadingIDs)))
doc.Version = time.Now().Unix()