improve: [a/]() link population
update DB
This commit is contained in:
10
__init__.py
10
__init__.py
@@ -20,7 +20,7 @@ import nodes
|
||||
import torch
|
||||
|
||||
|
||||
version = [1, 13, 6]
|
||||
version = [1, 13, 7]
|
||||
version_str = f"V{version[0]}.{version[1]}" + (f'.{version[2]}' if len(version) > 2 else '')
|
||||
print(f"### Loading: ComfyUI-Manager ({version_str})")
|
||||
|
||||
@@ -756,7 +756,7 @@ def convert_markdown_to_html(input_text):
|
||||
pattern_white = re.compile(r'%%([^*]+)%%')
|
||||
|
||||
def replace_a(match):
|
||||
return f"<a href='{match.group(2)}'>{match.group(1)}</a>"
|
||||
return f"<a href='{match.group(2)}' target='blank'>{match.group(1)}</a>"
|
||||
|
||||
def replace_w(match):
|
||||
return f"<p class='cm-warn-note'>{match.group(1)}</p>"
|
||||
@@ -785,6 +785,9 @@ def populate_markdown(x):
|
||||
if 'description' in x:
|
||||
x['description'] = convert_markdown_to_html(x['description'])
|
||||
|
||||
if 'name' in x:
|
||||
x['name'] = x['name'].replace('<', '<').replace('>', '>')
|
||||
|
||||
if 'title' in x:
|
||||
x['title'] = x['title'].replace('<', '<').replace('>', '>')
|
||||
|
||||
@@ -891,6 +894,9 @@ async def fetch_externalmodel_list(request):
|
||||
|
||||
check_model_installed(json_obj)
|
||||
|
||||
for x in json_obj['models']:
|
||||
populate_markdown(x)
|
||||
|
||||
return web.json_response(json_obj, content_type='application/json')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user