From ffe5dced444c01070dfb32caab290974a4477b11 Mon Sep 17 00:00:00 2001 From: Minho Date: Sun, 25 Mar 2018 21:18:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96Markdown=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/BookModel.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/models/BookModel.go b/models/BookModel.go index 81f72bfb..fe8ca873 100644 --- a/models/BookModel.go +++ b/models/BookModel.go @@ -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()