From 371b64e731479e379068f29d80201bb1f50c7351 Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Mon, 8 Feb 2016 01:37:46 +0000 Subject: [PATCH] Removed case senstivity from savin Former-commit-id: 1591534e5b64859e8a4fb4811644ef47ce8e172f [formerly 451962c969cfd77bf8cb4f8ec49d2604675a5246] [formerly b53ba2a5e4fd889e0838d1509143099546589614 [formerly fe69bdee4f23d666d073a1c91dd173a7320a7e31]] Former-commit-id: 6063556d33984e3d9d448681c6b379b879a6d6c5 [formerly 7d66254c32a990820a5fe68622d78fd78ff580da] Former-commit-id: b91d89eda14dde6a7f802da2fa25acf9deb1ba86 --- routes.go | 1 - static/css/view.css | 2 +- websockets.go | 3 ++- 3 files changed, 3 insertions(+), 3 deletions(-) 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) }