mirror of https://github.com/jlelse/GoBlog
Code highlighting in editor preview as well
This commit is contained in:
parent
0414d2fe85
commit
1aa2a8f655
|
@ -12,7 +12,6 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/microcosm-cc/bluemonday"
|
||||
"go.goblog.app/app/pkgs/contenttype"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
@ -86,8 +85,6 @@ func (a *goBlog) createMarkdownPreview(blog string, markdown []byte) (rendered [
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// Sanitize HTML
|
||||
rendered = bluemonday.UGCPolicy().SanitizeBytes(rendered)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{{ define "title" }}
|
||||
<link rel="stylesheet" href="{{ asset "css/chroma.css" }}">
|
||||
<title>{{ string .Blog.Lang "editor" }} - {{ mdtitle .Blog.Title }}</title>
|
||||
{{ end }}
|
||||
|
||||
|
|
Loading…
Reference in New Issue