midad fmt
midad fmt <path> [--check|--stdout]
Rewrites the code inside the fenced blocks and leaves the prose alone. path
may be a file or a directory, in which case every .md file under it is
formatted.
| flag | meaning |
|---|---|
--check |
report whether anything would change; write nothing |
--stdout |
print the formatted file instead of overwriting it |
$ midad fmt hello.md --check
$ midad fmt hello.md
It is a formatter for the block indentation, not for expression spacing: it does
not add spaces inside if(x){...}. Running it twice changes nothing.