Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2024-05-02 13:13:33 +08:00
commit dcb2e495fd
9 changed files with 18 additions and 14 deletions

View file

@ -210,7 +210,7 @@
<option value="fr_FR">Français</option>
<option value="zh_CN">简体中文</option>
<option value="zh_CHT">繁體中文</option>
<option value="jp_JP">日本語</option>
<option value="ja_JP">日本語</option>
</select>
</label>
<label class="b3-label">
@ -254,7 +254,7 @@
<option value="fr_FR">Français</option>
<option value="zh_CN">简体中文</option>
<option value="zh_CHT">繁體中文</option>
<option value="jp_JP">日本語</option>
<option value="ja_JP">日本語</option>
</select>
</label>
<label class="b3-label">

View file

@ -190,7 +190,7 @@ export abstract class Constants {
en_US: "20210808180117-6v0mkxr",
fr_FR: "20210808180117-6v0mkxr",
es_ES: "20210808180117-6v0mkxr",
jp_JP: "20210808180117-6v0mkxr",
ja_JP: "20210808180117-6v0mkxr",
};
public static readonly QUICK_DECK_ID = "20230218211946-2kw8jgx";

View file

@ -263,7 +263,7 @@ declare namespace Config {
* User interface language
* Same as {@link IAppearance.lang}
*/
export type TLang = "en_US" | "es_ES" | "fr_FR" | "zh_CHT" | "zh_CN" | "jp_JP";
export type TLang = "en_US" | "es_ES" | "fr_FR" | "zh_CHT" | "zh_CN" | "ja_JP";
/**
* SiYuan bazaar related configuration

File diff suppressed because one or more lines are too long

View file

@ -122,7 +122,7 @@ func extensionCopy(c *gin.Context) {
}
luteEngine := util.NewStdLute()
md := luteEngine.HTML2Md(dom)
md, _ := model.HTML2Markdown(dom)
md = strings.TrimSpace(md)
var unlinks []*ast.Node

View file

@ -7,8 +7,8 @@ require (
github.com/88250/clipboard v0.1.5
github.com/88250/epub v0.0.0-20230830085737-c19055cd1f48
github.com/88250/go-humanize v0.0.0-20240424102817-4f78fac47ea7
github.com/88250/gulu v1.2.3-0.20240324024901-3c1bb82cba30
github.com/88250/lute v1.7.7-0.20240426152525-692d31b09cd2
github.com/88250/gulu v1.2.3-0.20240501100058-dfdea8ef020e
github.com/88250/lute v1.7.7-0.20240501085643-eb6f97b5b990
github.com/88250/pdfcpu v0.3.14-0.20230401044135-c7369a99720c
github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1
github.com/ClarkThan/ahocorasick v0.0.0-20231011042242-30d1ef1347f4

View file

@ -10,10 +10,10 @@ github.com/88250/go-humanize v0.0.0-20240424102817-4f78fac47ea7 h1:MafIFwSS0x6A4
github.com/88250/go-humanize v0.0.0-20240424102817-4f78fac47ea7/go.mod h1:HrKCCTin3YNDSLBD02K0AOljjV6eNwc3/zyEI+xyV1I=
github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950 h1:Pa5hMiBceTVVqrYaDlLio2QSKbXMUmAZPbzCwT5eNCw=
github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
github.com/88250/gulu v1.2.3-0.20240324024901-3c1bb82cba30 h1:IeE4DVRWnVpcbMj7gGZoSMiBWs3h/ihiyOmualS1Mas=
github.com/88250/gulu v1.2.3-0.20240324024901-3c1bb82cba30/go.mod h1:MUfzyfmbPrRDZLqxc7aPrVYveatTHRfoUa5TynPS0i8=
github.com/88250/lute v1.7.7-0.20240426152525-692d31b09cd2 h1:ij6zgH3jCeBzRQ1hRgJzuEFwyHBO8coK5Jn1fCFAamo=
github.com/88250/lute v1.7.7-0.20240426152525-692d31b09cd2/go.mod h1:VDAzL8b+oCh+e3NAlmwwLzC53ten0rZlS8NboB7ljtk=
github.com/88250/gulu v1.2.3-0.20240501100058-dfdea8ef020e h1:sJ4Cab5UYEG1LxV9auNtfCc4ePy/TYg+m1gQx7NMDU0=
github.com/88250/gulu v1.2.3-0.20240501100058-dfdea8ef020e/go.mod h1:MUfzyfmbPrRDZLqxc7aPrVYveatTHRfoUa5TynPS0i8=
github.com/88250/lute v1.7.7-0.20240501085643-eb6f97b5b990 h1:aDwkV9eHMm0v14+yCKSjBupfuh9lMZmWGWmMinJpfGc=
github.com/88250/lute v1.7.7-0.20240501085643-eb6f97b5b990/go.mod h1:VDAzL8b+oCh+e3NAlmwwLzC53ten0rZlS8NboB7ljtk=
github.com/88250/pdfcpu v0.3.14-0.20230401044135-c7369a99720c h1:Dl/8S9iLyPMTElnWIBxmjaLiWrkI5P4a21ivwAn5pU0=
github.com/88250/pdfcpu v0.3.14-0.20230401044135-c7369a99720c/go.mod h1:S5YT38L/GCjVjmB4PB84PymA1qfopjEhfhTNQilLpv4=
github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1 h1:48T899JQDwyyRu9yXHePYlPdHtpJfrJEUGBMH3SMBWY=

View file

@ -33,6 +33,7 @@ import (
"os"
"path"
"path/filepath"
"regexp"
"runtime/debug"
"sort"
"strconv"
@ -927,8 +928,11 @@ func processBase64Img(n *ast.Node, dest string, assetDirPath string, err error)
os.MkdirAll(base64TmpDir, 0755)
sep := strings.Index(dest, ";base64,")
str := strings.TrimSpace(dest[sep+8:])
re := regexp.MustCompile(`(?i)%0A`)
str = re.ReplaceAllString(str, "\n")
var decodeErr error
unbased, decodeErr := base64.StdEncoding.DecodeString(dest[sep+8:])
unbased, decodeErr := base64.StdEncoding.DecodeString(str)
if nil != decodeErr {
logging.LogErrorf("decode base64 image failed: %s", decodeErr)
return

View file

@ -79,7 +79,7 @@ func Boot() {
readOnly := flag.String("readonly", "false", "read-only mode")
accessAuthCode := flag.String("accessAuthCode", "", "access auth code")
ssl := flag.Bool("ssl", false, "for https and wss")
lang := flag.String("lang", "", "zh_CN/zh_CHT/en_US/fr_FR/es_ES/jp_JP")
lang := flag.String("lang", "", "zh_CN/zh_CHT/en_US/fr_FR/es_ES/ja_JP")
mode := flag.String("mode", "prod", "dev/prod")
flag.Parse()