Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Oct 3, 2022
2 parents 4f9c1cb + 8cbdff7 commit 658193a
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 3 deletions.
2 changes: 2 additions & 0 deletions app/appearance/langs/en_US.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"defBlock": "Def block",
"defBlockChildren": "Define block and its children",
"filter": "Filter",
"copyHeadings": "Copy Headings and Bottom Blocks",
"tWithSubtitle":"Transformation with subtitles",
Expand Down
2 changes: 2 additions & 0 deletions app/appearance/langs/es_ES.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"defBlock": "Definir bloque",
"defBlockChildren": "Definir bloque y sus hijos",
"filter": "Filtro",
"copyHeadings": "Copiar encabezados y bloques inferiores",
"tWithSubtitle": "Transformación con subtítulos",
Expand Down
2 changes: 2 additions & 0 deletions app/appearance/langs/fr_FR.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"defBlock": "Définir le bloc",
"defBlockChildren": "Définir le bloc et ses enfants",
"filter": "Filtre",
"copyHeadings": "Copier les en-têtes et les blocs inférieurs",
"tWithSubtitle": "Transformation avec sous-titres",
Expand Down
2 changes: 2 additions & 0 deletions app/appearance/langs/zh_CHT.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"defBlock": "定義塊",
"defBlockChildren": "定義塊及其子塊",
"filter": "過濾",
"copyHeadings": "複製標題及下方塊",
"tWithSubtitle": "帶子標題轉換",
Expand Down
2 changes: 2 additions & 0 deletions app/appearance/langs/zh_CN.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"defBlock": "定义块",
"defBlockChildren": "定义块及其子块",
"filter": "过滤",
"copyHeadings": "复制标题及下方块",
"tWithSubtitle": "带子标题转换",
Expand Down
4 changes: 2 additions & 2 deletions app/src/menus/protyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ export const refMenu = (protyle: IProtyle, element: HTMLElement) => {
});
}
submenu.push({
label: "原始块",
label: window.siyuan.languages.defBlock,
click() {
fetchPost("/api/block/swapBlockRef", {
refID: id,
Expand All @@ -230,7 +230,7 @@ export const refMenu = (protyle: IProtyle, element: HTMLElement) => {
}
});
submenu.push({
label: "原始块及子块",
label: window.siyuan.languages.defBlockChildren,
click() {
fetchPost("/api/block/swapBlockRef", {
refID: id,
Expand Down
2 changes: 1 addition & 1 deletion kernel/model/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,12 @@ func SwapBlockRef(refID, defID string, includeChildren bool) (err error) {

if ast.NodeListItem == defNode.Type {
if ast.NodeListItem == refNode.Type {
defNode.InsertAfter(refNode)
if !includeChildren {
for _, c := range defNodeChildren {
refNode.AppendChild(c)
}
}
defNode.InsertAfter(refNode)
refPivot.InsertAfter(defNode)
} else {
newID := ast.NewNodeID()
Expand Down

0 comments on commit 658193a

Please sign in to comment.