close <li> items in ToC
properly escape interanl links beginning with #