mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-01-30 18:22:56 +08:00
Allow newline in Extra Network activation text (#16428)
This commit is contained in:
parent
deb3803a3a
commit
820fe8d2b5
@ -201,7 +201,7 @@ function setupExtraNetworks() {
|
||||
setupExtraNetworksForTab('img2img');
|
||||
}
|
||||
|
||||
var re_extranet = /<([^:^>]+:[^:]+):[\d.]+>(.*)/;
|
||||
var re_extranet = /<([^:^>]+:[^:]+):[\d.]+>(.*)/s;
|
||||
var re_extranet_g = /<([^:^>]+:[^:]+):[\d.]+>/g;
|
||||
|
||||
var re_extranet_neg = /\(([^:^>]+:[\d.]+)\)/;
|
||||
|
@ -177,10 +177,8 @@ def add_pages_to_demo(app):
|
||||
app.add_api_route("/sd_extra_networks/get-single-card", get_single_card, methods=["GET"])
|
||||
|
||||
|
||||
def quote_js(s):
|
||||
s = s.replace('\\', '\\\\')
|
||||
s = s.replace('"', '\\"')
|
||||
return f'"{s}"'
|
||||
def quote_js(s: str):
|
||||
return json.dumps(s, ensure_ascii=False)
|
||||
|
||||
|
||||
class ExtraNetworksPage:
|
||||
|
Loading…
Reference in New Issue
Block a user