Markdown Code Block Repair

•
35
•

Automatically identifies and repairs malformed or unclosed markdown code blocks to ensure proper documentation rendering.

The fix-markdown-fences skill provides an automated solution for fixing common markdown rendering issues caused by malformed code fences. It specifically targets 'bleeding' content where code blocks fail to terminate correctly because the closing fence incorrectly contains a language identifier or is missing entirely. By employing a stateful line-by-line scanning algorithm, it preserves indentation for nested blocks and ensures all markdown files meet standard formatting requirements, making it an essential utility for maintaining professional READMEs and technical documentation.

主な機能

01Automatically closes unclosed code blocks at the end of files
02Supports batch validation and repair across entire documentation directories
03Detects and removes language identifiers from closing code fences
04Stateful line-by-line scanning to prevent misidentification of sequential blocks
0535 GitHub stars
06Preserves original indentation levels for nested code blocks

ユースケース

01Validating markdown formatting as a pre-commit check to ensure rendering consistency
02Cleaning up malformed markdown generated by automated scripts or LLMs
03Repairing documentation where code snippets are bleeding into the surrounding text