Skip to content

feat: implement MD053 link-image-reference-definitions rule - #28

Merged
ekropotin merged 1 commit into
mainfrom
md053
Aug 6, 2025
Merged

feat: implement MD053 link-image-reference-definitions rule#28
ekropotin merged 1 commit into
mainfrom
md053

Conversation

@ekropotin

Copy link
Copy Markdown
Owner

Add comprehensive MD053 rule to detect unused and duplicate link/image reference definitions.

Features:

  • Detects unused reference definitions
  • Identifies duplicate definitions (first definition wins per CommonMark)
  • Supports all reference formats: full [text][label], collapsed [label][], shortcut [label]
  • CommonMark compliant label normalization (case-insensitive, whitespace collapse)
  • Configurable ignored definitions with sensible defaults (["//"] for comments)
  • Performance optimized with pre-compiled regex patterns and HashMap lookups

Implementation:

  • Document-wide rule type for comprehensive analysis
  • 13 comprehensive unit tests covering all scenarios and edge cases
  • Proper integration with configuration system and CLI
  • Complete documentation and test sample files
  • Code formatting improvements across multiple files

🤖 Generated with Claude Code

Add comprehensive MD053 rule to detect unused and duplicate link/image reference definitions.

Features:
- Detects unused reference definitions
- Identifies duplicate definitions (first definition wins per CommonMark)
- Supports all reference formats: full [text][label], collapsed [label][], shortcut [label]
- CommonMark compliant label normalization (case-insensitive, whitespace collapse)
- Configurable ignored definitions with sensible defaults (["//"] for comments)
- Performance optimized with pre-compiled regex patterns and HashMap lookups

Implementation:
- Document-wide rule type for comprehensive analysis
- 13 comprehensive unit tests covering all scenarios and edge cases
- Proper integration with configuration system and CLI
- Complete documentation and test sample files
- Code formatting improvements across multiple files

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@ekropotin
ekropotin merged commit 677d3a5 into main Aug 6, 2025
1 check passed
@ekropotin
ekropotin deleted the md053 branch August 8, 2025 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant