loom-md-tables
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMarkdown Table Formatting
Markdown 表格格式化
Utility for fixing markdown table alignment and spacing. Normalizes column widths, ensures consistent padding, and preserves alignment markers.
用于修复Markdown表格对齐和间距问题的工具。标准化列宽,确保内边距一致,并保留对齐标记。
Quick Examples
快速示例
bash
undefinedbash
undefinedPreview fixed output
Preview fixed output
python fix-md-tables.py document.md
python fix-md-tables.py document.md
Fix in-place
Fix in-place
python fix-md-tables.py document.md -i
undefinedpython fix-md-tables.py document.md -i
undefinedCommon Patterns
常见示例
Status tables:
markdown
| Stage | Status | Branch |
| ----- | --------- | ---------- |
| build | Complete | loom/build |
| test | Executing | loom/test |Configuration tables:
markdown
| Option | Default | Description |
| ---------- | ------- | --------------------- |
| timeout | 300 | Session timeout (sec) |
| auto_merge | false | Enable auto merging |Right-aligned numbers:
markdown
| Item | Count | Total |
| ----- | ----: | ----: |
| Files | 42 | 500 |
| Lines | 1,234 | 5,000 |状态表格:
markdown
| Stage | Status | Branch |
| ----- | --------- | ---------- |
| build | Complete | loom/build |
| test | Executing | loom/test |配置表格:
markdown
| Option | Default | Description |
| ---------- | ------- | --------------------- |
| timeout | 300 | Session timeout (sec) |
| auto_merge | false | Enable auto merging |右对齐数字:
markdown
| Item | Count | Total |
| ----- | ----: | ----: |
| Files | 42 | 500 |
| Lines | 1,234 | 5,000 |Features
功能特性
- Aligns columns to consistent widths
- Single-space padding for cells
- Preserves alignment markers (,
:---,:---:)---: - Adds blank lines around tables
- 对齐列至统一宽度
- 单元格使用单空格内边距
- 保留对齐标记(,
:---,:---:)---: - 在表格前后添加空行
Alignment Markers
对齐标记
| Syntax | Alignment |
|---|---|
| Left (default) |
| Left |
| Right |
| Center |
| 语法 | 对齐方式 |
|---|---|
| 左对齐(默认) |
| 左对齐 |
| 右对齐 |
| 居中对齐 |