Quantcast
Channel: User Nisse Engström - Meta Stack Overflow
Viewing all articles
Browse latest Browse all 31

Code snippet breaks Markdown parser

$
0
0

When editing a post, the Markdown parser in the Preview seems to break down after a code snippet. Everything (except the pre-formatted text) following the code snippet in Example A below appears incorrectly as unformatted text.

However, a <pre> element with at least one linebreak seems to set it straight again. In Example B below, the code snippet is directly followed by the pre-formatted text which makes everything work as expected.

See screenshot at the bottom of the post.


Example A

<p>This is a code snippet.
int main (void){  return !"This is a code block.";}
  • This
  • is
  • a
  • list.
This is pre-formatted text.

Example B

<p>This is a code snippet.
This is pre-formatted text.
int main (void){  return !"This is a code block.";}
  • This
  • is
  • a
  • list.

Screenshot of the Preview rendering

Preview rendering

(Click for full image)


Viewing all articles
Browse latest Browse all 31

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>