Code blocks inside quotes - Rendered vs. preview problems

In Obsidian, this markdown:

> Hello:
> ```
> root@android:/ # ndc
> Usage: ndc [sockname] <monitor>|<cmd> [arg1] [arg2...]
> ```

Looks entirely different in the live-preview mode versus the rendered mode. It looks like I’d expect in the rendered mode, but in live-preview the brackets seem to be confusing things. I can escape these brackets with backslashes and it will look good in live-preview, but it will then fail to render correctly in rendered mode.

I’m doing this in the Obsidian sandbox vault, which I think is probably just generic Obsidian (no plugins/styles).

Is this a problem with live-preview, or should I be escaping only a certain subset of these brackets and pipe?

Thanks

How are they confusing things? Do they look like links? If so, it’s an unfortunate quirk of Live Preview (some themes may correct for it — Minimal does in general, tho I don’t know about this specific case).

Here’s the live preview:
image

And the rendered result:
image

So the preview doesn’t look right in this case. If I escape the two opening “<” brackets, it now looks correct in the preview, but the rendered version looks like:
image

I think this is just an issue with Live Preview and/or Obsidian’s syntax highlighting. My impression is that in general Reading Mode’s rendering is more “real” (more accurately reflects the HTML generated from the Markdown). Live Preview is trying to render while also serving as an editor. I could be wrong, but this is how it seems to me.

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