In live preview, a set of three hyphens at the top of a code block is rendered as a horizontal line

Steps to reproduce

In the sandbox vault, create a new note with the following content

```markdown
---
key: value
---

content
```

Did you follow the troubleshooting guide? [Y/N]

Yes (including searching the whole forum by “live preview code block line”, “live preview code block hyphen” etc)

Expected result

The three hyphens should be displayed as-is, like so

Actual result

In live preview, the hyphens at the top of the code block are misrecognized as a horizontal line.
(In reading view, it works fine.)

It would be worth mentioning that a set of three hyphens appearing at the top of a code block is very common especially when dealing with markdown code blocks, as that’s just how we write front matters in Obsidian.

Environment

SYSTEM INFO:
	Obsidian version: v1.5.3
	Installer version: v1.5.3
	Operating system: Darwin Kernel Version 22.6.0: Wed Jul  5 22:22:52 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T8103 22.6.0
	Login status: logged in
	Catalyst license: none
	Insider build toggle: off
	Live preview: on
	Base theme: adapt to system
	Community theme: none
	Snippets enabled: 0
	Restricted mode: off
	Plugins installed: 0
	Plugins enabled: 0

RECOMMENDATIONS:
	none

Additional Information

If I add some random text before the first three hyphens, then it works.

I think it’s this one:

I didn’t try every language, but it seems like it only happens with ~~~markdown code blocks.

Thank you for pointing out that thread. I’m sorry my search was not thorough enough.

Wow, you’re right, I overlooked that, too. This looks strange…

Thank you, I recalled there was a thread for this problem.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.