This directory contains utility scripts for maintaining the SWFRecompDocs repository.
Fixes markdown formatting issues where consecutive lines starting with ** (bold text or metadata fields) get merged into a single line by markdown viewers.
Problem:
Without blank lines between consecutive ** lines, markdown renderers merge them into a single line.
For example, this problematic format:
**Date:** 2025-11-01
**Repository:** SWFRecompGets rendered as: "Date: 2025-11-01 Repository: SWFRecomp"
Note: We can't show the actual problem in this README because the script automatically fixes it! The example above already has a blank line inserted between the fields.
Solution:
The script automatically inserts blank lines between consecutive ** lines:
**Date:** 2025-11-01
**Repository:** SWFRecompUsage:
# Run from anywhere in the repository
./scripts/fix-markdown-formatting.shWhat it does:
- Scans all
.mdfiles in the repository - Identifies files with consecutive lines starting with
** - Inserts blank lines between them
- Creates
.bakbackup files before modifying - Reports which files were fixed
When to use:
- After adding or updating documentation with metadata fields
- When you notice metadata fields appearing on one line in the markdown viewer
- As a maintenance task to ensure all docs render properly
Note: The script creates backups with .bak extension. After verifying the changes look correct, you can remove them with:
find . -name '*.md.bak' -deleteWhen adding new maintenance scripts to this directory:
- Make the script executable:
chmod +x scripts/your-script.sh - Add usage comments at the top of the script
- Update this README with documentation
- Use relative paths so scripts work from any directory
- Consider creating backups before modifying files