I just encountered a bug while I was writing a post on a Discourse-powered forum and would like to report it.
It seems like if I have two fenced code blocks with an info string of “{.cpp}”, where each block starts with a line equal to “```{.cpp}” and ends with a line equal to “```”, then any text formatting between the two blocks of code does not work at all, and we see the markup instead of seeing nicely-formatted text. See below for an example:
// Here is a block of C++ code.
For some reason we cannot have monospace
, italic, bold, or link text in this paragraph, which is between two blocks of C++ code. In fact, I can’t find any other Markdown, BBCode, or HTML that does work in this area.
We can’t even have multiple paragraphs.
// Here is a second block of C++ code.
A workaround for this is to remove the {.cpp}
info string on the first code block, but of course that destroys the code highlighting in that first block. I couldn’t find any better solution even though I tried info strings of “.cpp”, “cpp”, and “c++”.
I made a copy of this post as a Gist so you can see the markup I used and verify that it works correctly in GitHub-flavored Markdown.
–David