I have discovered a fluke (that is helpful, but might not be reliable). Specifically, I can embed a section of another file in a strange circumstance:
- The section header of interest in the other file is blank. The section header is simply this:
# This section has an empty header, and this is the content.
# with no actual text, indicating a blank section header.)
Now, you’d think that it would either be impossible to embed a link to this (blank) header in another (parent) Markdown file, OR that choosing the section to embed would itself just involve a blank (empty string), as in:
![[file name#]] (notice the
# to reference a heading, but an empty string follows).
Not particularly surprisingly, the above method of referencing the child file/section fails.
But I discovered something that works. By using a period in the parent reference, as in
![[file name#.]] (notice the period
.), the blank heading IS successfully referenced. Just that block of the child file is properly embedded in the parent file.
Note that I need a blank heading because in Obsidian’s Excalidraw plugin, the section heading along with the content appears in an embedded frame, and the usual Obsidian CSS tricks (which DO work for normal markdown parent files) do not work with Excalidraw frame embeddings to hide this section heading text. And I do not want the heading text itself to appear in the embedded frame. So I tried to find a way to make the heading blank (starting by typing a period for the section heading and noticing that it worked - but that when saving the child Markdown file the period was automatically removed by the linter yet referencing that section with a period still worked!)
So, my question is: Is this expected behavior? Why is it possible to reference a blank header using a period?