修复项目概述不解析Markdown的BUG

pull/219/merge
Minho 2018-02-27 13:25:31 +08:00
parent c3e758ab4f
commit 405a9c309f
2 changed files with 3 additions and 1 deletions

View File

@ -22,6 +22,7 @@ import (
"github.com/lifei6671/mindoc/utils/pagination" "github.com/lifei6671/mindoc/utils/pagination"
"net/http" "net/http"
"github.com/lifei6671/mindoc/converter" "github.com/lifei6671/mindoc/converter"
"github.com/russross/blackfriday"
) )
type BookController struct { type BookController struct {
@ -76,6 +77,7 @@ func (c *BookController) Dashboard() {
c.Abort("500") c.Abort("500")
} }
c.Data["Description"] = template.HTML(blackfriday.MarkdownBasic([]byte(book.Description)))
c.Data["Model"] = *book c.Data["Model"] = *book
} }

View File

@ -92,7 +92,7 @@
<span class="title">文档标签:</span> <span class="title">文档标签:</span>
<span class="body">{{.Model.Label}}</span> <span class="body">{{.Model.Label}}</span>
</div> </div>
<div class="summary">{{.Model.Description}} </div> <div class="summary">{{.Description}} </div>
</div> </div>
</div> </div>