I created a vault with only the Buttons(0.9.13) plugin, then created a file named buttons.md and wrote the following content
21321
name My Super Button
type command
action Toggle Pin
^button-super
name 日记
type command
action 日记: 打开/创建今天的日记
color default
^button-daily
button-daily
button-super
name Toggle Pin
type command
action Toggle pin
^button-example-command
'button-super' will be rendered as an Error loading button, and 'button-daily' and 'button-example-command' will render normally.
I debugged and found that the cache.blocks calculated in the addButtonToStore function is as follows, where the position field in the first block is incorrect(note position.start.line and position.end.line)
{
"button-super": {
"position": {
"start": {
"line": 7,
"col": 0,
"offset": 73
},
"end": {
"line": 7,
"col": 13,
"offset": 86
}
},
"id": "button-super",
"path": "buttons.md",
"swap": 0
},
"button-daily": {
"position": {
"start": {
"line": 8,
"col": 0,
"offset": 87
},
"end": {
"line": 13,
"col": 3,
"offset": 157
}
},
"id": "button-daily",
"path": "buttons.md",
"swap": 0
},
"button-example-command": {
"position": {
"start": {
"line": 21,
"col": 0,
"offset": 206
},
"end": {
"line": 25,
"col": 3,
"offset": 266
}
},
"id": "button-example-command",
"path": "buttons.md",
"swap": 0
}
}
I created a vault with only the Buttons(0.9.13) plugin, then created a file named
buttons.mdand wrote the following content21321
^button-super
^button-daily
button-dailybutton-super^button-example-command
'button-super' will be rendered as an Error loading button, and 'button-daily' and 'button-example-command' will render normally.
I debugged and found that the cache.blocks calculated in the
addButtonToStorefunction is as follows, where thepositionfield in the first block is incorrect(noteposition.start.lineandposition.end.line){ "button-super": { "position": { "start": { "line": 7, "col": 0, "offset": 73 }, "end": { "line": 7, "col": 13, "offset": 86 } }, "id": "button-super", "path": "buttons.md", "swap": 0 }, "button-daily": { "position": { "start": { "line": 8, "col": 0, "offset": 87 }, "end": { "line": 13, "col": 3, "offset": 157 } }, "id": "button-daily", "path": "buttons.md", "swap": 0 }, "button-example-command": { "position": { "start": { "line": 21, "col": 0, "offset": 206 }, "end": { "line": 25, "col": 3, "offset": 266 } }, "id": "button-example-command", "path": "buttons.md", "swap": 0 } }