Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
d1f224be27
9 changed files with 22 additions and 10 deletions
|
@ -10,7 +10,6 @@ import {confirmDialog} from "../../dialog/confirmDialog";
|
|||
import {getThemeMode, setInlineStyle} from "../../util/assets";
|
||||
import {fetchPost} from "../../util/fetch";
|
||||
import {Dialog} from "../../dialog";
|
||||
import {pathPosix} from "../../util/pathName";
|
||||
import {replaceLocalPath} from "../../editor/rename";
|
||||
import {setStorageVal} from "../util/compatibility";
|
||||
import {isPaidUser} from "../../util/needSubscribe";
|
||||
|
@ -661,7 +660,8 @@ const onExport = (data: IWebSocketData, filePath: string, exportOption: IExportO
|
|||
<link rel="stylesheet" type="text/css" id="baseStyle" href="stage/build/export/base.css?${Constants.SIYUAN_VERSION}"/>
|
||||
<link rel="stylesheet" type="text/css" id="themeDefaultStyle" href="appearance/themes/${themeName}/theme.css?${Constants.SIYUAN_VERSION}"/>
|
||||
${themeStyle}
|
||||
<title>${pathPosix().basename(filePath)} - ${window.siyuan.languages.siyuanNote} v${Constants.SIYUAN_VERSION}</title>
|
||||
<title>${data.data.name}</title>
|
||||
<!-- Exported by SiYuan v${Constants.SIYUAN_VERSION} -->
|
||||
<style>
|
||||
body {font-family: var(--b3-font-family);background-color: var(--b3-theme-background);color: var(--b3-theme-on-background)}
|
||||
${setInlineStyle(false)}
|
||||
|
|
|
@ -241,6 +241,10 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven
|
|||
files = event.dataTransfer.items;
|
||||
}
|
||||
}
|
||||
|
||||
// Improve the pasting of selected text in PDF rectangular annotation https://github.com/siyuan-note/siyuan/issues/11629
|
||||
textPlain = textPlain.replace(/\r\n|\r|\u2028|\u2029/g, "\n");
|
||||
|
||||
/// #if !BROWSER
|
||||
// 不再支持 PC 浏览器 https://github.com/siyuan-note/siyuan/issues/7206
|
||||
if (!siyuanHTML && !textHTML && !textPlain && ("clipboardData" in event)) {
|
||||
|
|
2
app/stage/protyle/js/lute/lute.min.js
vendored
2
app/stage/protyle/js/lute/lute.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -8,7 +8,7 @@ require (
|
|||
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.20240612035750-c9cf5f7a4d02
|
||||
github.com/88250/lute v1.7.7-0.20240730020836-20236672b252
|
||||
github.com/88250/lute v1.7.7-0.20240808231416-a09d4a0b6a12
|
||||
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
|
||||
|
|
|
@ -12,8 +12,8 @@ github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950 h1:Pa5hMiBceT
|
|||
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.20240612035750-c9cf5f7a4d02 h1:3e5+yobj655pTeKOYMbJrnc1mE51ZkbXIxquTYZuYCY=
|
||||
github.com/88250/gulu v1.2.3-0.20240612035750-c9cf5f7a4d02/go.mod h1:MUfzyfmbPrRDZLqxc7aPrVYveatTHRfoUa5TynPS0i8=
|
||||
github.com/88250/lute v1.7.7-0.20240730020836-20236672b252 h1:2sZit/GLN8HV3HYfC3oVYsH6rADfynRSGB+kW5BY6fo=
|
||||
github.com/88250/lute v1.7.7-0.20240730020836-20236672b252/go.mod h1:VDAzL8b+oCh+e3NAlmwwLzC53ten0rZlS8NboB7ljtk=
|
||||
github.com/88250/lute v1.7.7-0.20240808231416-a09d4a0b6a12 h1:cwiIh1RYNdgNq4djfeDZOjo250I7/4XB8FAE56uJpVo=
|
||||
github.com/88250/lute v1.7.7-0.20240808231416-a09d4a0b6a12/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=
|
||||
|
|
|
@ -215,7 +215,10 @@ func LoadTreeByBlockID(id string) (ret *parse.Tree, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
logging.LogWarnf("block tree not found [id=%s], stack: [%s]", id, logging.ShortStack())
|
||||
stack := logging.ShortStack()
|
||||
if !strings.Contains(stack, "BuildBlockBreadcrumb") {
|
||||
logging.LogWarnf("block tree not found [id=%s], stack: [%s]", id, stack)
|
||||
}
|
||||
return nil, ErrTreeNotFound
|
||||
}
|
||||
|
||||
|
|
|
@ -195,8 +195,6 @@ func processVirtualRef(n *ast.Node, unlinks *[]*ast.Node, virtualBlockRefKeyword
|
|||
}
|
||||
}
|
||||
|
||||
// Wrong parsing virtual reference with `\` before it https://github.com/siyuan-note/siyuan/issues/7821
|
||||
newContent = strings.ReplaceAll(newContent, "\\"+search.GetMarkSpanStart(search.VirtualBlockRefDataType), "\\\\"+search.GetMarkSpanStart(search.VirtualBlockRefDataType))
|
||||
n.Tokens = []byte(newContent)
|
||||
linkTree := parse.Inline("", n.Tokens, luteEngine.ParseOptions)
|
||||
var children []*ast.Node
|
||||
|
|
|
@ -172,7 +172,9 @@ func rewritePortJSON(pid, port string) {
|
|||
}
|
||||
|
||||
func serveExport(ginServer *gin.Engine) {
|
||||
ginServer.Static("/export/", filepath.Join(util.TempDir, "export"))
|
||||
// Potential data export disclosure security vulnerability https://github.com/siyuan-note/siyuan/issues/12213
|
||||
exportGroup := ginServer.Group("/export/", model.CheckAuth)
|
||||
exportGroup.Static("/", filepath.Join(util.TempDir, "export"))
|
||||
}
|
||||
|
||||
func serveWidgets(ginServer *gin.Engine) {
|
||||
|
|
|
@ -135,6 +135,11 @@ func initDBTables() {
|
|||
logging.LogFatalf(logging.ExitCodeReadOnlyDatabase, "create index [idx_blocks_id] failed: %s", err)
|
||||
}
|
||||
|
||||
_, err = db.Exec("CREATE INDEX idx_blocks_parent_id ON blocks(parent_id)")
|
||||
if nil != err {
|
||||
logging.LogFatalf(logging.ExitCodeReadOnlyDatabase, "create index [idx_blocks_parent_id] failed: %s", err)
|
||||
}
|
||||
|
||||
_, err = db.Exec("CREATE INDEX idx_blocks_root_id ON blocks(root_id)")
|
||||
if nil != err {
|
||||
logging.LogFatalf(logging.ExitCodeReadOnlyDatabase, "create index [idx_blocks_root_id] failed: %s", err)
|
||||
|
|
Loading…
Add table
Reference in a new issue