mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
Removed case senstivity from savin
Former-commit-id: 1591534e5b64859e8a4fb4811644ef47ce8e172f [formerly 451962c969cfd77bf8cb4f8ec49d2604675a5246] [formerly b53ba2a5e4fd889e0838d1509143099546589614 [formerly fe69bdee4f
]]
Former-commit-id: 6063556d33984e3d9d448681c6b379b879a6d6c5 [formerly 7d66254c32a990820a5fe68622d78fd78ff580da]
Former-commit-id: b91d89eda14dde6a7f802da2fa25acf9deb1ba86
This commit is contained in:
parent
f43b34d5ff
commit
371b64e731
@ -64,7 +64,6 @@ func renderMarkdown(c *gin.Context, title string) {
|
|||||||
unsafe := blackfriday.MarkdownCommon([]byte(p.CurrentText))
|
unsafe := blackfriday.MarkdownCommon([]byte(p.CurrentText))
|
||||||
html := bluemonday.UGCPolicy().SanitizeBytes(unsafe)
|
html := bluemonday.UGCPolicy().SanitizeBytes(unsafe)
|
||||||
html2 := string(html)
|
html2 := string(html)
|
||||||
|
|
||||||
r, _ := regexp.Compile("\\$\\$(.*?)\\$\\$")
|
r, _ := regexp.Compile("\\$\\$(.*?)\\$\\$")
|
||||||
for _, s := range r.FindAllString(html2, -1) {
|
for _, s := range r.FindAllString(html2, -1) {
|
||||||
html2 = strings.Replace(html2, s, "<span class='texp' data-expr='"+s[2:len(s)-2]+"'></span>", 1)
|
html2 = strings.Replace(html2, s, "<span class='texp' data-expr='"+s[2:len(s)-2]+"'></span>", 1)
|
||||||
|
@ -308,6 +308,6 @@ padding: 0.4em 1em 6em;
|
|||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
.yue {
|
.yue {
|
||||||
max-width: 650px;
|
max-width: 675px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/gorilla/websocket"
|
"github.com/gorilla/websocket"
|
||||||
)
|
)
|
||||||
@ -40,7 +41,7 @@ func wshandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var p CowyoData
|
var p CowyoData
|
||||||
err = p.load(m.Title)
|
err = p.load(strings.ToLower(m.Title))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user