fix underline length

if you're hasty and type more than three '='s/'-'s, the underline will be longer than the title above. To fix this we need to subtract the (remaining) length of the current line from the length of the title.
Merge pull request #257 from Knorkebrot/patch-1

fix underline length