Issue #6265 resolved

MarkDown rendering bug

Brad Conte
created an issue

Rendered MarkDown assigns titles/headers in the document an ID when generating the HTML. But the ID in some cases is just the original title verbatim, so this allows a title to accidentally get assigned an ID that is already in use elsewhere on the page.

In my repository I have a README: https://bitbucket.org/B_Con/project-euler (note: it's private). I have a section titled "content" in the README which gets the ID "content" when it's rendered, but the page already has a CSS rule for the ID "content". So my README's "content" DIV gets the wrong rule applied to it and a bad rendering happens.

A simple fix might be to prefix all the rendered IDs with some constant not used anywhere else, like "document-section-*" or something.

Comments (2)

  1. Log in to comment