mirror of
https://codeberg.org/VnPower/PixivFE
synced 2024-12-06 19:16:23 +01:00
novel: fix staticcheck issues
This commit is contained in:
+4
-3
@@ -5,9 +5,10 @@ import (
|
||||
"regexp"
|
||||
"time"
|
||||
|
||||
"net/http"
|
||||
|
||||
"codeberg.org/vnpower/pixivfe/v2/server/session"
|
||||
"github.com/goccy/go-json"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
type Novel struct {
|
||||
@@ -106,8 +107,8 @@ func GetNovelByID(r *http.Request, id string) (Novel, error) {
|
||||
}
|
||||
|
||||
// Novel embedded illusts
|
||||
re_r := regexp.MustCompile("\\[pixivimage:(\\d+.\\d+)\\]")
|
||||
re_d := regexp.MustCompile("\\d+.\\d+")
|
||||
re_r := regexp.MustCompile(`\[pixivimage:(\d+\.\d+)\]`)
|
||||
re_d := regexp.MustCompile(`\d+\.\d+`)
|
||||
re_t := regexp.MustCompile(`\"original\":\"(.+?)\"`)
|
||||
|
||||
novel.Content = re_r.ReplaceAllStringFunc(novel.Content, func(s string) string {
|
||||
|
||||
Reference in New Issue
Block a user