You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#!/bin/bash
|
|
|
|
for file in *.md; do
|
|
perl -0777 -i -pe '
|
|
s/\r\n/\n/g; # Normalize Windows line endings to Unix
|
|
s/(?:[ \t]*\n){2,}/\n\n/g; # Collapse multiple blank lines (even with whitespace)
|
|
' "$file"
|
|
done
|
|
|
|
echo "Collapsed extra blank lines." |