Code highlighting in editor preview as well

This commit is contained in:
Jan-Lukas Else 2021-11-15 22:01:08 +01:00
parent 0414d2fe85
commit 1aa2a8f655
2 changed files with 1 additions and 3 deletions

View File

@ -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
}

View File

@ -1,4 +1,5 @@
{{ define "title" }}
<link rel="stylesheet" href="{{ asset "css/chroma.css" }}">
<title>{{ string .Blog.Lang "editor" }} - {{ mdtitle .Blog.Title }}</title>
{{ end }}