diff --git a/routes.go b/routes.go index 6b22abf..883456a 100644 --- a/routes.go +++ b/routes.go @@ -64,7 +64,6 @@ func renderMarkdown(c *gin.Context, title string) { unsafe := blackfriday.MarkdownCommon([]byte(p.CurrentText)) html := bluemonday.UGCPolicy().SanitizeBytes(unsafe) html2 := string(html) - r, _ := regexp.Compile("\\$\\$(.*?)\\$\\$") for _, s := range r.FindAllString(html2, -1) { html2 = strings.Replace(html2, s, "", 1) diff --git a/static/css/view.css b/static/css/view.css index a470193..e4e0e71 100644 --- a/static/css/view.css +++ b/static/css/view.css @@ -308,6 +308,6 @@ padding: 0.4em 1em 6em; background: #fff; } .yue { -max-width: 650px; +max-width: 675px; margin: 0 auto; } diff --git a/websockets.go b/websockets.go index b870450..4c56e6a 100644 --- a/websockets.go +++ b/websockets.go @@ -4,6 +4,7 @@ import ( "encoding/json" "fmt" "net/http" + "strings" "github.com/gorilla/websocket" ) @@ -40,7 +41,7 @@ func wshandler(w http.ResponseWriter, r *http.Request) { } var p CowyoData - err = p.load(m.Title) + err = p.load(strings.ToLower(m.Title)) if err != nil { panic(err) }