-
-
Notifications
You must be signed in to change notification settings - Fork 402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Markdown hierarchy appearing wrong in navigation panel #2994
Comments
Hm, the used "algorithm" searches for the previews heading that is one level higher, that is |
Yeah, I skipped h3... Like I said, maybe I use the hierarchy in a 'particular' way, but I thought the algorithm should also consider the typing position in the file. To explain better, I always start typing subjects using h4 and under it I put (normal text) to explain in details, if the issue belongs to some group, I add h3, h2 and h1 to organize it, for better understanding and visualization of priorities. If what I did is considered wrong, I apologize and ask you to close the issue Sorry for my English |
"Wrong" is a harsh word. 😊 It's more like in HTML or Markdown you are not supposed to skip heading level... The current implementation of finding a suitable parent is: QOwnNotes/src/widgets/navigationwidget.cpp Lines 185 to 195 in 3cd56c6
Works great for a valid Markdown heading structure. ️🤷🏻 |
Yeah, like you said, it's not recommended. I took a quick read at this interesting discussion about this topic: Initially, when i opened the ticket I just wanted to show this 'unexpected' behavior to the devs; well, it's done. You've been very kind regarding this issue, thank you! And again, sorry for my broken English |
You've been very polite too! 🙏🏻 |
Phew, it's rather hard to find a more suitable parent item if the structure isn't valid... |
This issue is stale because it has been open for 30 days with no activity. |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
My Setup
QOwnNotes Version: 24.3.4 Portable
Windows 10 Pro version 22h2
Processor: Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz 3.10 GHz
RAM: 8,00 GB
Expected behavior
In the note navigation panel, the expand/collapse behavior (parents) should be:
Actual behavior
In the note navigation panel, the expand/collapse behavior (parents) happening is:
The h4(2.2.x.x) titles should be 'child' of '2.2' but it appears as 'child' of '1.1.3'
Sometimes in my notes, I use the number of (#) to group issues according to their importance or subject, so not every time I have a perfect sequence (#, ##, ###, ####) I mean, some of them may be skipped.
In my example, since the h4s are after the h2s in the text I believe they should be grouped accordingly in the panel, but contrary to that, the h2s got thrown down and the grouping got messy
Steps to reproduce
Open a new note, paste the following text, and see the behavior of the note navigation panel
Print Screen:
The text was updated successfully, but these errors were encountered: