Live preview: support math block in quotes

Steps to reproduce

Write a display math block with more than one line in blockquote. For example:

> $$
> a+b+c
> $$

Expected result

The math equation to be rendered correctly with no confusion.

Actual result

The leading character > of blockquote is also rendered as a part of the math equation.

image

Environment

  • Operating system: Mac OS 12.12
  • Debug info:
SYSTEM INFO:
	Obsidian version: v0.13.24
	Installer version: v0.12.19
	Operating system: Darwin Kernel Version 21.3.0: Wed Jan  5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_ARM64_T6000 21.3.0
	Login status: logged in
	Catalyst license: vip
	Insider build toggle: on
	Live preview: on
	Legacy editor: off
	Base theme: light
	Community theme: Minimal
	Snippets enabled: 0
	Safe mode: off
	Plugins installed: 37
	Plugins enabled: 29
		1: Cycle through Panes
		2: Dynamic Table of Contents
		3: Mind Map
		4: Open vault in VSCode
		5: Editor Syntax Highlight
		6: Word Splitting for Simplified Chinese in Edit Mode
		7: Admonition
		8: Kanban
		9: Pandoc Plugin
		10: Quick Explorer
		11: Templater
		12: Calendar
		13: Annotator
		14: Diagrams
		15: Clear Unused Images
		16: Quick Latex for Obsidian
		17: Advanced Tables
		18: Find unlinked files and unresolved links
		19: Folder Note
		20: Recent Files
		21: Homepage
		22: Timelines
		23: Frontmatter Tag Suggest
		24: HTML Tags Autocomplete
		25: Tag Wrangler
		26: Dataview
		27: Excalidraw
		28: QuickAdd
		29: Image Toolkit

RECOMMENDATIONS:
	Custom theme: for cosmetic issues, please first try updating your theme to latest. If still not fixed, please try to make the issue happen in the help vault or disable community theme and snippets.
	Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the help vault or disable community plugins.
2 Likes

FYI, this incorrect behavior does not happen in reading mode.

Renamed and moved to FR.

Sorry for self-advertising, but I made a plugin that resolves this problem (and has other powerful features like equation numbering & referencing)!

UPDATE

Iā€™m moving this feature from the plugin above to another plugin of mine called Better Math in Callouts & Blockquotes with a bunch of improvements.