mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-07-03 14:09:06 +02:00
🎨 Remove leading and trailing whitespace characters from the plugin's top bar icon parameters (#17322)
This commit is contained in:
@@ -199,6 +199,7 @@ export class Plugin {
|
||||
position?: "south" | "left",
|
||||
callback: (evt: MouseEvent) => void
|
||||
}) {
|
||||
options.icon = options.icon.trim();
|
||||
if (!options.icon.startsWith("icon") && !options.icon.startsWith("<svg")) {
|
||||
console.error(`plugin ${this.name} addTopBar error: icon must be svg id or svg tag`);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user