Nodes/ZMG PLUGIN/Remove Empty Lines 🗑️
ComfyUI Node

Remove Empty Lines 🗑️

去除空行节点 - 处理文本内容,去除不需要的空行 功能特性: • 支持多种处理模式(严格/宽松/仅修剪) • 可选择保留单个空行用于段落分隔 • 自动去除行首尾空白字符 • 提供详细的处理统计信息 • 支持大文本处理 处理模式: • strict: 仅去除完全空行(不包含任何字符) • loose: 去除空行和仅包含空白字符的行 • trim_only: 仅去除每行的首尾空白,保留所有行 输入参数: • text: 要处理的文本内容 • mode: 处理模式选择 • preserve_single_empty: 是否保留单个空行 • trim_lines: 是否去除行首尾空白 输出: • processed_text: 处理后的文本 • statistics: 处理统计信息 • removed_lines_count: 被移除的行数

By fq393·Created 2 years ago·Updated 7 months ago· 8
Remove Empty Lines 🗑️
    • processed_text
    • statistics
    • removed_lines_count
    text
    modestrict
    preserve_single_emptyfalse
    trim_linestrue
    CategoryZMGNodes/data

    Inputs (4)

    NameTypeDefaultDescription
    textSTRING
    modeCOMBOstrictstrict: 去除完全空行; loose: 去除空行和仅空白字符行; trim_only: 仅去除行首尾空白
    preserve_single_emptyBOOLEANfalse是否保留单个空行(用于段落分隔)
    trim_linesBOOLEANtrue是否去除每行的首尾空白字符

    Outputs (3)

    NameTypeDescription
    processed_textSTRING
    statisticsSTRING
    removed_lines_countINT