← 返回
未分类 中文

Clean Text Formatter

Removes Markdown formatting and excess whitespace from text to produce clean, publication-ready plain text with normalized punctuation and spacing.
移除Markdown格式和多余空白字符,生成整洁、可直接发布的纯文本,并规范化标点符号和间距。
zihaowyt5525-max zihaowyt5525-max 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 382
下载
💾 0
安装
1
版本
#cleaning#latest#markdown#text#utility

概述

Clean Text Formatter

Name

clean-text-formatter

Description

Removes Markdown formatting characters and excessive whitespace from AI-generated text. Produces clean, publication-ready plain text.

Capabilities

1. Markdown Stripping

Strips the following while preserving content:

  • Headers: #, ##, ### (removes markers, keeps text)
  • Bold/italic markers: *, __, , _ (removes markers, keeps text)
  • Links: text → keeps text
  • Images: !alt → keeps alt
  • Blockquotes: > lines (removed)
  • Code blocks: backticks removed, code content preserved
  • List markers: -, *, 1. (removed, list content preserved)
  • Horizontal rules: ---, * (removed)
  • Footnotes: [^1] (removed)

2. Whitespace Cleaning Around Numbers

Fixes common AI spacing issues:

  • 100 %100%
  • ¥ 100¥100
  • USD 50USD 50 (currency symbols kept with numbers)
  • Numbers with leading/trailing spaces trimmed
  • Thousand separators , preserved: 1,000,000

3. Punctuation Spacing

  • Removes spaces before punctuation:
  • Removes spaces inside parentheses: ( 文本 )(文本)
  • Normalizes multiple spaces to single space
  • Trim leading/trailing whitespace from each line

4. Unicode Normalization

  • Normalizes quotes: "text""text", 'text''text'
  • Normalizes dashes: -

Triggers

  • User pastes text and asks to "clean" or "remove Markdown"
  • User shares AI-generated content and asks to "format for publication"
  • Any content containing visible Markdown syntax

Workflow

  1. Receive raw text input (paste, file upload, or document content)
  2. Detect content type and Markdown density
  3. Apply cleaning rules in order:

a. Structural (headers, lists, blockquotes)

b. Inline formatting (links, images, emphasis)

c. Whitespace normalization

d. Punctuation spacing fix

  1. Return clean text + optional export

Input

  • Plain text paste
  • .txt, .md, .docx, .html files
  • Direct document content

Output

  • Clean plain text (ready to copy/paste)
  • Optional: .txt file export

Limitations

  • Does not preserve Markdown intended for re-use (strips permanently)
  • Complex nested formatting may require manual review
  • LaTeX math expressions: $$...$$ and $...$ are preserved

Dependencies

  • Python 3.8+ (for regex processing)
  • No external packages required

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-03 10:48 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

SPSS Data Cleaning Assistant

zihaowyt5525-max
提供SPSS数据清洗,包括缺失值检测与处理、异常值识别、数据类型诊断、变量重编码、重复值处理及验证,并生成清洗报告。
★ 1 📥 551

横纵分析法

zihaowyt5525-max
通过时间纵深与横截面双维度系统还原对象演变与现状,挖掘交叉洞察,辅助文献综述与行业报告分析。
★ 2 📥 478

Skill Creator Assistant

zihaowyt5525-max
通过针对性提问,引导非技术用户无需编码即可创建完整 OpenClaw 技能(含 SKILL.md),并可选上传至 GitHub。
★ 0 📥 362