Condense the test for the header ids
Compress multiple spaces into one dash
Test a second level heading as well