Excalidraw Files Not Displaying Correctly in PDF Export of Nested Embedded Note

Steps to reproduce

  1. Install Excalidraw Plugin, enable it
  2. Create a new note named NoteA
  3. Open Command Palette, choose “Excalidraw: Create new drawing - in a new tab - and embed into active document”
  4. Draw something, save and close the canvas
  5. You should see your drawing in NoteA now
  6. Create another note named NoteB, embed NoteA into it
  7. You should see your drawing in NoteB now
  8. Export NoteB as pdf, the drawing shows well
  9. Add YAML section to NoteA, for example, add a tag property (Even the section only contains two --- and no properties, it can cause the export problem)
  10. Now, you shoud see your drawing in NoteB well, but just inside Obsidian!
  11. Export NoteB, the Drawing will only export as markdown file, as below:
    image|300*300

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

Expected result

The export result of NoteB shows the drawing properly
(the drawing is embedded into NoteA, NoteA is embedded into NoteB, and NoteA has properties)

Actual result

The export result of NoteB cannot show the drawing properly

Environment

SYSTEM INFO:
Obsidian version: v1.7.7
Installer version: v1.7.7
Operating system: Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:30 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6000 23.6.0
Login status: logged in
Language: en
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: 1
Plugins enabled: 1
1: Excalidraw v2.7.3

we don’t take bug reports involving third party plugins.
You need to make a bug report to the exalidraw plugin.
If there is a problem with Obsidian core, they make a bug report to us.

Moved to help.

Here is the solution