Describe the bug
"Insert at end of section" option in Capture event is ignored when the specified heading also contains sub-sections.
To Reproduce
Steps to reproduce the behavior (Source mode and line numbers enabled for visibility):
Create a new note file with 1 heading titled H1 and a sub-heading labelled H2.
Create a new QuickAdd Capture titled "End of H1" with settings as shown.
Run QuickAdd: "End of H1" from the Command Palette and enter value "1" in the prompt modal.
Note "1" is inserted at the end of sub-section H2 (rather than H1).
Run QuickAdd: "End of H1" again from the Command Palette and enter value "2" in the prompt modal.
Note that the second value entered ("2") is placed above the first value ("1") in sub-section H2, rather than at the end of section H1.
Extra weird behavior: the presence of properties will change the above outcome.
Repeat steps 1-6 on new note file which has properties (i.e. "tags" field).
Note the entered values now are correctly placed in section H1, although the are still incorrectly placed at the start of the section, rather than the end (evidenced by "2" appearing above "1").
Expected behavior
Entered values should be placed at the end of the specified section (i.e. H1) and ultimately appear in the same order as they were entered (i.e. 1 followed by 2), as shown:
Without properties
With properties
Screenshots
See above.
Desktop (please complete the following information):
OS: Windows 10
Browser Chrome
QuickAdd Version 1.8.1
Obsidian 1.5.12
Smartphone (please complete the following information):
Device: Samsung Galaxy A20
OS: Android 11
Browser Firefox
QuickAdd Version 1.8.1
Obsidian 1.5.12
Additional context
If my interpretation of sections is incorrect, it might be worth specifying the difference between Headings and Sections within the QuickAdd UI.
Describe the bug "Insert at end of section" option in Capture event is ignored when the specified heading also contains sub-sections.
To Reproduce Steps to reproduce the behavior (Source mode and line numbers enabled for visibility):
Extra weird behavior: the presence of properties will change the above outcome.
Expected behavior Entered values should be placed at the end of the specified section (i.e. H1) and ultimately appear in the same order as they were entered (i.e. 1 followed by 2), as shown:
Without properties![image](https://github.com/chhoumann/quickadd/assets/168368272/42f199e6-5aa1-40b1-ac1c-c2c3e2c64709)
With properties![image](https://github.com/chhoumann/quickadd/assets/168368272/7fcb0fde-715b-473f-95f7-6045fff61e89)
Screenshots See above.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context If my interpretation of sections is incorrect, it might be worth specifying the difference between Headings and Sections within the QuickAdd UI.