kramed
kramed copied to clipboard
Append identical header ids with counter
This ensures unique HTML id's in line with the HTML spec, and allows anchors to always reference the intended header.
Fixes #27
Not that this change will break another test that has two identical headers. It is also not finished, since the instance of Renderer
persists across blobs of Markdown, and therefore the counters do not get reset. However looking at renderer.js
it doesn't hold much state, and probably would be cheap to instantiate anew for each Markdown blob.