mirror of
https://github.com/DominikDoom/a1111-sd-webui-tagcomplete.git
synced 2026-03-09 07:10:16 +00:00
Make tag regex work with more < configurations
Will now allow completion of a < tag if the one directly after is also a < tag only separated by a space. (Happens often now that Loras are a thing and <>'s stay in the prompt with them)
This commit is contained in:
@@ -286,7 +286,9 @@ function isEnabled() {
|
||||
}
|
||||
|
||||
const WEIGHT_REGEX = /[([]([^,()[\]:| ]+)(?::(?:\d+(?:\.\d+)?|\.\d+))?[)\]]/g;
|
||||
const TAG_REGEX = /(<[^\t\n\r,>]+>?|[^\s,|<>]+|<)/g
|
||||
const POINTY_REGEX = /<[^\s,<](?:[^\t\n\r,<>]*>|[^\t\n\r,> ]*)/g;
|
||||
const NORMAL_TAG_REGEX = /[^\s,|<>]+|</g;
|
||||
const TAG_REGEX = new RegExp(`${POINTY_REGEX.source}|${NORMAL_TAG_REGEX.source}`, "g");
|
||||
|
||||
// On click, insert the tag into the prompt textbox with respect to the cursor position
|
||||
async function insertTextAtCursor(textArea, result, tagword) {
|
||||
|
||||
Reference in New Issue
Block a user