Remove any first/last dashes from anchors
There are cases where the title might start/end with a non-alphanumerical character like a period or a parenthesis. Stripping those characters fixes the ToC not being the same as the anchor links.
There are cases where the title might start/end with a non-alphanumerical character like a period or a parenthesis. Stripping those characters fixes the ToC not being the same as the anchor links.