Last updated
Normalizing Heading Styles
A document with mixed heading styles is standardized to hash-symbol format:
Before (mixed styles):
# Main Title
Section One
===========
### Subsection
Section Two
-----------
After (normalized to ATX hash style):
# Main Title
## Section One
### Subsection
## Section Two
The formatter converts underline-style headings (Setext) to hash-style (ATX) for consistency.
Standardizing List Markers
A document using mixed list markers is normalized to hyphens:
Before (mixed markers):
* Item one
+ Item two
- Item three
* Item four
After (normalized to hyphens):
- Item one
- Item two
- Item three
- Item four
Fixing Ordered List Numbering
Ordered lists with incorrect numbers are renumbered sequentially:
Before (incorrect numbering):
1. First step
1. Second step
1. Third step
Or:
1. First step
3. Second step
7. Third step
After (sequential numbering):
1. First step
2. Second step
3. Third step
Removing Trailing Whitespace
Trailing spaces are invisible but create noise in version control diffs:
Before (trailing spaces shown as ·):
# Heading·
·
Some text here.···
·
Another paragraph.··
After (clean):
# Heading
Some text here.
Another paragraph.
Removing trailing whitespace makes Git diffs cleaner and prevents accidental hard line breaks (two trailing spaces create a <br> in Markdown).
Normalizing Blank Lines Between Sections
Inconsistent blank lines between sections are normalized:
Before (inconsistent spacing):
# Heading 1
## Heading 2
Some text.
## Heading 3
Some more text.
## Heading 4
After (consistent — one blank line between sections):
# Heading 1
## Heading 2
Some text.
## Heading 3
Some more text.
## Heading 4
Aligning Markdown Tables
Unaligned table columns are padded for readability:
Before (unaligned):
| Name | Age | City |
|---|---|---|
| Alice | 30 | New York |
| Bob | 25 | Los Angeles |
| Carol | 35 | Chicago |
After (aligned):
| Name | Age | City |
|-------|-----|-------------|
| Alice | 30 | New York |
| Bob | 25 | Los Angeles |
| Carol | 35 | Chicago |
Aligned tables are much easier to read and edit in the raw Markdown source.
Standardizing Code Block Fences
Mixed code fence styles are normalized to triple backticks:
Before (mixed fences):
~~~javascript
const x = 1;
~~~
```python
x = 1
```
# Indented code block
x = 1
After (normalized to triple backticks):
```javascript
const x = 1;
```
```python
x = 1
```
```
# Indented code block
x = 1
```
Converting Link Styles
Convert between inline and reference-style links:
Before (inline links):
See the [documentation](https://docs.example.com) for details.
Visit [our website](https://example.com) to learn more.
Check the [API reference](https://api.example.com/docs).
After (reference-style links):
See the [documentation][docs] for details.
Visit [our website][website] to learn more.
Check the [API reference][api-ref].
[docs]: https://docs.example.com
[website]: https://example.com
[api-ref]: https://api.example.com/docs
Reference-style links keep the document body clean and make URLs easier to update — change the URL in one place rather than finding every occurrence.
Fixing Heading Hierarchy
The formatter detects and fixes skipped heading levels:
Before (skipped levels):
# Main Title
### Section (skipped H2!)
##### Subsection (skipped H4!)
Accessibility issue: Screen readers and document outlines
expect headings to be sequential.
After (fixed hierarchy):
# Main Title
## Section
### Subsection
Full Format Report
After formatting, the tool shows a summary of all changes made:
Formatting Report:
─────────────────────────────────────────────────────────────────────
Changes applied:
✓ Normalized 3 Setext headings to ATX style
✓ Standardized 12 list markers to hyphens
✓ Renumbered 2 ordered lists sequentially
✓ Removed trailing whitespace from 18 lines
✓ Normalized blank lines in 5 sections
✓ Aligned 2 tables (padded 23 cells)
✓ Standardized 4 code fences to backticks
✓ Fixed 1 heading hierarchy violation
No content was changed — only formatting was adjusted.
Original: 2,847 characters
Formatted: 2,831 characters (16 characters removed)