Markdown code block does not display correctly on site (BB-16056)

Issue #12669 duplicate
Jesse Yowell
staff created an issue

Our Markdown guide states that “Markdown wraps a code block in both <pre> and <code> tags.”. This doesn’t seems to be the case when I do a code block inside ordered or unordered lists and when the markdown file is displayed on your website. (Again, I followed here to put a code block inside a list: https://gist.github.com/clintel/1155906). When it’s displayed on your web site, the code block is wrapped in <p><code>...</code></p>, resulting in multiple lines of code being displayed in one line. Other markdown to html tools rendered the correct html format. If I use browser’s dev tool to change <p> </p>to <pre></pre>, it also displays correctly.

Comments (4)

  1. Scott Picton

    Given the number of bugs in markdown.pl rather than patching a broken implementation I'd like to suggest Common Mark as a potential replacement. Or perhaps provide an option of which implementation of markdown to use since Python's markdown is also quite popular. Adding an additional markdown implementation would at least allow previous markdown to remain unbroken.

  2. Log in to comment