From f1e676d82cfe8434c942ae95e9c397163c2acd54 Mon Sep 17 00:00:00 2001 From: Shigma Date: Mon, 31 Oct 2022 14:00:19 +0800 Subject: [PATCH] feat: support --undesired syntax --- .gitattributes | 1 + package.json | 2 +- src/config.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitattributes b/.gitattributes index ed5f338..f6b1d23 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,4 +3,5 @@ *.png -text *.jpg -text *.ico -text +*.gif -text *.webp -text diff --git a/package.json b/package.json index f0faac9..c2a3823 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "koishi-plugin-novelai", "description": "Generate images by NovelAI", - "version": "1.12.4", + "version": "1.12.5", "main": "lib/index.js", "typings": "lib/index.d.ts", "files": [ diff --git a/src/config.ts b/src/config.ts index c97f0e5..44e4184 100644 --- a/src/config.ts +++ b/src/config.ts @@ -243,7 +243,7 @@ export function parseInput(input: string, config: Config, forbidden: Forbidden[] } // extract negative prompts - const capture = input.match(/(,\s*|\s+)(-u\s+|negative prompts?:)\s*([\s\S]+)/m) + const capture = input.match(/(,\s*|\s+)(-u\s+|--undesired\s+|negative prompts?:\s*)([\s\S]+)/m) if (capture?.[3]) { input = input.slice(0, capture.index).trim() appendToList(negative, capture[3])