diff --git a/web/model-manager.js b/web/model-manager.js index 32fea70..3ca12aa 100644 --- a/web/model-manager.js +++ b/web/model-manager.js @@ -3155,10 +3155,16 @@ async function getModelInfos(urlText) { const type = civitaiInfo["type"]; civitaiInfo["versions"].forEach((version) => { const images = version["images"]; - const tags = version["tags"]; + const tags = version["tags"]?.map((tag) => { + tag = tag.trim(); + if (tag.slice(-1) === ",") { + return tag.slice(0, -1); + } + return tag; + }); const description = [ tags !== undefined ? "# Trigger Words" : undefined, - tags?.join(", "), + tags?.join(tags.some((tag) => { return tag.includes(","); }) ? "\n" : ", "), version["description"] !== undefined ? "# About this version " : undefined, version["description"], civitaiInfo["description"] !== undefined ? "# " + name : undefined,