mirror of
https://github.com/koishijs/novelai-bot
synced 2025-01-05 11:36:44 +08:00
feat: support --undesired syntax
This commit is contained in:
parent
9ce387d7a2
commit
f1e676d82c
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -3,4 +3,5 @@
|
||||
*.png -text
|
||||
*.jpg -text
|
||||
*.ico -text
|
||||
*.gif -text
|
||||
*.webp -text
|
||||
|
@ -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": [
|
||||
|
@ -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])
|
||||
|
Loading…
Reference in New Issue
Block a user