Bug in Markdown preview

If there is no empty line between the end of the metadata and a colon in the following text, the text is not shown in the preview:

  1. Preview works:
---
title: test
---
colon
  1. Preview works:
---
title: test
---

colon:
  1. Preview broken:
---
title: test
---
colon:

To quote from the relevant MMD 6 user’s guide

After the metadata is finished, a blank line triggers the beginning of the rest of the document.

So, you didn’t detect a bug in the MD preview, but in your usage of MD metadata. Just add the “blank line (that) triggers the beginning of the rest of the document” and you’re fine.

3 Likes

Well, you are right!

Without the blank line the content seems to understood as metadata, where the key ends with a colon.

But then there is still a bug, technically. Without the blank line there should not be anything visible in the preview.

But yes. To be compliant with Multimarkdown I have to work with a blank line after my custom “—” at the end.

It’s usually not a good idea to reject a whole document due to the presence of a few non-standard elements. Try running the developer tools on your preferred news website. It’s quite possible that some errors and warnings will be reported. Yet your browser manages to make do with those imperfections and display the article you’d like to read. The program’s primary mission is to bring the content to you, not to deliver an all-or-nothing verdict regarding its validity.

Got your point. But considering the initial bug, that text with a colon is not show with a blank link this would another good case to show the text even if it is not 100 percent compliant.

But in the end chrillek is right. There is the syntax rules and nothing else.

Therefore nothing else to discuss here.

1 Like