If you need to write a note containing multiple YAML blocks in Bear, you simply can't - and the reason is a syntax conflict Bear created itself
I write a note that documents or contains more than one YAML block. The first `---` delimiter at the top of the note is correctly recognised as frontmatter. Every subsequent `---` anywhere else in the note renders as a horizontal rule. Your YAML blocks collapse into dividers.
The workarounds Bear leaves are all broken:
- Fenced code block (```` ```yaml ````) renders the content as inert - syntax-highlighted text, not structured data. Fine for a tutorial, useless if you or any downstream tool needs to read the block as YAML.
- Mangle the delimiter: break `---` somehow to stop Bear intercepting it - now the YAML is malformed.
- Abandon YAML syntax entirely: use something Bear won't touch - and lose the format.
None of these are acceptable if the use case is genuine structured content.
The root problem: Bear uses `---` for two things distinguished only by *position* - YAML frontmatter at the top, horizontal rule everywhere else. But `---` as a horizontal rule is standard Markdown (original spec and CommonMark both support it, alongside `***` and `___`). Bear honours that standard, but only after claiming the syntax for frontmatter at position zero.
Position-dependent disambiguation of the same token in my opinion is fragile and non-obvious. I hope in a future cleaner design that would either reserve a distinct syntax for frontmatter, or support YAML blocks at arbitrary positions without them silently becoming horizontal rules.