mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-12-17 18:31:21 +08:00
优化部分显示效果
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"github.com/lifei6671/mindoc/models"
|
||||
"io"
|
||||
"strings"
|
||||
"github.com/russross/blackfriday"
|
||||
)
|
||||
|
||||
type BaseController struct {
|
||||
@@ -42,7 +43,8 @@ func (c *BaseController) Prepare() {
|
||||
c.Option = make(map[string]string, len(options))
|
||||
for _, item := range options {
|
||||
c.Data[item.OptionName] = item.OptionValue
|
||||
c.Option[item.OptionName] = item.OptionValue
|
||||
c.Option[item.OptionName] = string(blackfriday.MarkdownBasic([]byte(item.OptionValue)))
|
||||
|
||||
if strings.EqualFold(item.OptionName, "ENABLE_ANONYMOUS") && item.OptionValue == "true" {
|
||||
c.EnableAnonymous = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user