mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-21 21:22:11 -03:00
feat: Enhance text cleanup in LoraLoader, LoraStacker, and WanVideoLoraSelect to handle extra commas and trailing commas
This commit is contained in:
@@ -145,8 +145,9 @@ app.registerExtension({
|
||||
}
|
||||
);
|
||||
|
||||
// Clean up multiple spaces and trim
|
||||
newText = newText.replace(/\s+/g, " ").trim();
|
||||
// Clean up multiple spaces, extra commas, and trim; remove trailing comma if it's the only content
|
||||
newText = newText.replace(/\s+/g, " ").replace(/,\s*,+/g, ",").trim();
|
||||
if (newText === ",") newText = "";
|
||||
|
||||
inputWidget.value = newText;
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user