chjj/marked — pull request #457 by Feder1co5oave (2014-07-28 13:46:02+00:00)
Title: Trim excess dashes from heading IDs

When I have something like

~~~
# Heading with some trailing punctuation...
~~~

With the default Renderer I get

~~~html

Heading with some trailing punctuation...

~~~

(notice the trailing dash in the id).
This PR fixes this:

~~~html

Heading with some trailing punctuation...

~~~

**Warning**: this may change the way URLs are generated and break existing links.