- Redundant final newlines trimmed into one
- Missing final newlines added where can be added
According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character although not
mandatory.
[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
Add script to generate it. The "doctoc" tool used previously seems
to be only for single file documents.
This commit also fixed the headling level in some places.