mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-09-05 07:47:04 +08:00
Update nodes_string.py
Add multiline string node
This commit is contained in:
parent
bab836d88d
commit
09b1eed33f
@ -2,6 +2,22 @@ import re
|
|||||||
|
|
||||||
from comfy.comfy_types.node_typing import IO
|
from comfy.comfy_types.node_typing import IO
|
||||||
|
|
||||||
|
class StringMultiline():
|
||||||
|
@classmethod
|
||||||
|
def INPUT_TYPES(s):
|
||||||
|
return {
|
||||||
|
"required": {
|
||||||
|
"string": (IO.STRING, {"multiline": True})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RETURN_TYPES = (IO.STRING,)
|
||||||
|
FUNCTION = "execute"
|
||||||
|
CATEGORY = "utils/string"
|
||||||
|
|
||||||
|
def execute(self, string, **kwargs):
|
||||||
|
return string,
|
||||||
|
|
||||||
class StringConcatenate():
|
class StringConcatenate():
|
||||||
@classmethod
|
@classmethod
|
||||||
def INPUT_TYPES(s):
|
def INPUT_TYPES(s):
|
||||||
@ -296,6 +312,7 @@ class RegexExtract():
|
|||||||
return result,
|
return result,
|
||||||
|
|
||||||
NODE_CLASS_MAPPINGS = {
|
NODE_CLASS_MAPPINGS = {
|
||||||
|
"StringMultiline": StringMultiline,
|
||||||
"StringConcatenate": StringConcatenate,
|
"StringConcatenate": StringConcatenate,
|
||||||
"StringSubstring": StringSubstring,
|
"StringSubstring": StringSubstring,
|
||||||
"StringLength": StringLength,
|
"StringLength": StringLength,
|
||||||
@ -309,6 +326,7 @@ NODE_CLASS_MAPPINGS = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
NODE_DISPLAY_NAME_MAPPINGS = {
|
NODE_DISPLAY_NAME_MAPPINGS = {
|
||||||
|
"StringMultiline": "Multiline String",
|
||||||
"StringConcatenate": "Concatenate",
|
"StringConcatenate": "Concatenate",
|
||||||
"StringSubstring": "Substring",
|
"StringSubstring": "Substring",
|
||||||
"StringLength": "Length",
|
"StringLength": "Length",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user