mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 13:00:54 +00:00
remove markdown
This commit is contained in:
parent
ab08aa9c9e
commit
259617f68d
@ -23,7 +23,6 @@ func init() {
|
|||||||
beegoTplFuncMap = make(template.FuncMap)
|
beegoTplFuncMap = make(template.FuncMap)
|
||||||
BeeTemplateExt = make([]string, 0)
|
BeeTemplateExt = make([]string, 0)
|
||||||
BeeTemplateExt = append(BeeTemplateExt, "tpl", "html")
|
BeeTemplateExt = append(BeeTemplateExt, "tpl", "html")
|
||||||
beegoTplFuncMap["markdown"] = MarkDown
|
|
||||||
beegoTplFuncMap["dateformat"] = DateFormat
|
beegoTplFuncMap["dateformat"] = DateFormat
|
||||||
beegoTplFuncMap["date"] = Date
|
beegoTplFuncMap["date"] = Date
|
||||||
beegoTplFuncMap["compare"] = Compare
|
beegoTplFuncMap["compare"] = Compare
|
||||||
|
9
utils.go
9
utils.go
@ -2,7 +2,6 @@ package beego
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/russross/blackfriday"
|
|
||||||
"html/template"
|
"html/template"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
@ -17,14 +16,6 @@ func webTime(t time.Time) string {
|
|||||||
return ftime
|
return ftime
|
||||||
}
|
}
|
||||||
|
|
||||||
// MarkDown parses a string in MarkDown format and returns HTML. Used by the template parser as "markdown"
|
|
||||||
func MarkDown(raw string) (output template.HTML) {
|
|
||||||
input := []byte(raw)
|
|
||||||
bOutput := blackfriday.MarkdownBasic(input)
|
|
||||||
output = template.HTML(string(bOutput))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func Substr(s string, start, length int) string {
|
func Substr(s string, start, length int) string {
|
||||||
bt := []rune(s)
|
bt := []rune(s)
|
||||||
if start < 0 {
|
if start < 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user