🎨 Remove leading and trailing whitespace characters from the plugin's top bar icon parameters (#17322)

This commit is contained in:
Jeffrey Chen
2026-03-23 19:20:48 +08:00
committed by GitHub
parent 0eb77f5685
commit 375bd7774e
+1
View File
@@ -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;