Multiline Comments Display in Reading Mode

###Multiline Comments Display in Reading Mode

Steps to reproduce

  1. Create a new note in Obsidian.
  2. Paste the following content into the note:
# Check Out this Obsidian Bug

[Link](https://www.example.com/new/link/broken)  %%
# H1

## H2

By [A1](https://www.example.com/idiot/1) [A2](https://www.example.com/idiot/2) and [A3](https://www.example.com/idiot/3)

---

WASHINGTON—GPT Generated Brain Rot

And fluff

Copyright ©2025 Front Company, Inc. All Rights Reserved.

%%

WTF?

  1. Switch to Reading Mode.

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

Y

Expected result

The content inside the multiline comment (%%%% ) should not display in Reading Mode.

Actual result

The content inside the multiline comment displays in Reading Mode, despite being correctly hidden in the Source/Reading hybrid mode.

Environment

OS: MacOS
Obsidian Version: 1.7.7

Additional information

The issue seems specific to certain types of multiline comments, particularly those containing formatted text and headers. Attached are screenshots showing the behavior:

  1. Correct behavior in Source/Reading hybrid mode.
  2. Incorrect behavior in Reading Mode.
  3. I’m going to create a related bug, because you can link to the headings inside the comments. That may be OK, but the headings inside the comments shouldn’t show up in the link generation window.

Hybrid Mode is Correct

Reading Mode Broke