Trigger on unabbreviated lora/hypernet prefix

Makes going back to edit or switch out stuff easier since you don't need to erase the prefix anymore
This commit is contained in:
Dominik Reh
2023-02-24 14:50:22 +01:00
parent b5817b8d4a
commit 712c4a5862
2 changed files with 4 additions and 4 deletions

View File

@@ -5,8 +5,8 @@ class HypernetParser extends BaseTagParser {
parse() {
// Show hypernetworks
let tempResults = [];
if (tagword !== "<" && tagword !== "<h:") {
let searchTerm = tagword.replace("<h:", "").replace("<", "");
if (tagword !== "<" && tagword !== "<h:" && tagword !== "<hypernet:") {
let searchTerm = tagword.replace("<hypernet:", "").replace("<h:", "").replace("<", "");
tempResults = hypernetworks.filter(x => x.toLowerCase().includes(searchTerm)); // Filter by tagword
} else {
tempResults = hypernetworks;

View File

@@ -5,8 +5,8 @@ class LoraParser extends BaseTagParser {
parse() {
// Show lora
let tempResults = [];
if (tagword !== "<" && tagword !== "<l:") {
let searchTerm = tagword.replace("<l:", "").replace("<", "");
if (tagword !== "<" && tagword !== "<l:" && tagword !== "<lora:") {
let searchTerm = tagword.replace("<lora:", "").replace("<l:", "").replace("<", "");
tempResults = loras.filter(x => x.toLowerCase().includes(searchTerm)); // Filter by tagword
} else {
tempResults = loras;