Search section() cuts before first list item

Steps to reproduce

I have a section in a note like this:


Something that has some different points:

  1. Point one so interesting
  2. Some other thing
  3. Anot.her thing

So I make a query in the search core pluggin:
section(“some different points”)

I get:
Something that has some different points:

Did you follow the troubleshooting guide?


Expected result

I only got the first line of the section:
Something that has some different points:

Actual result

All the section, so: all the items of the list that is part of the section


Operating system: android 14 (samsung SM-X700)
Obsidian version: 1.5.12 (134)
API version: v1.5.12
Login status: logged in
Catalyst license: none
Live preview: on
Base theme: light
Community theme: none
Snippets enabled: 0
Restricted mode: off
Plugins installed: 41
Plugins enabled: 30
1: Dataview v0.5.66
2: Advanced Tables v0.21.0
3: Auto Split v1.1.2
4: Commander v0.5.1
5: Front Matter Title v3.9.0
6: Frontmatter Tag Suggest v0.4.1
7: Global Search and Replace v0.3.0
8: Templater v2.2.3
9: Underline v1.3.0
10: Link Headers Directly v1.0.2
11: Note Folder Autorename v0.1.2
12: Folder notes v1.7.22
13: Persistent Links v0.2.0
14: Quoth v0.7.1
15: Note Refactor v1.8.2
16: Table of Contents v0.2.0
17: Iconize v2.11.14
18: Double Colon Conceal v1.2.2
19: GPT-3 Notes v0.2.8
20: Tag Page v1.0.2
21: Reference Generator v1.0.1
22: Map of Content v1.4.0
23: Metadata Menu v0.8.7
24: Style Settings v1.0.8
25: Slurp v0.1.9
26: BRAT v1.0.1
27: Book Search v0.7.3
28: PDF++ v0.39.23
29: ZettelFlow v2.3.3
30: Timelines (Revamped) v2.1.5

Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

Additional information

Might it has to do with blank lines? It seems like search stops when there is 2 blank lines, not when there is a second heading

According to the Search documentation,

section: | Find matches in the same section (text between two headings).

Maybe section: isn’t necessary to use here?

In any event, does this query return the results you are hoping for?

section:"some different points"

I was expecting to get all the section : the list is part of the section so the query should return everything till the next heading. See more context

Alright, I guess I was confused by this part then.

Yes, sorry, I confused expected and actual. It is the other way around.
I expected to get all the section but I only got the first line before the list.
By definition, as it does not get all the section it is a bug, isn’t it?

I could be wrong, but my understanding is that section:() looks in a section (text between two headings) for the search terms, it doesn’t return the full section.

Here, pineapple and mango are both in the same section, so they are caught. The second lonely pineapple is ignored.

In your example, you could try clicking on the Show more context buttons to expand what is shown.

That is the problem really: Show more context, shows the first line, not the section, but in other cases it shows at least two paragraphs (the sections I am writing happen to be 2 paragraphs long at the moment).


Yeah, please share the search you are using, the source note, and some screenshots of what is being returned. Very curious.

This is not a bug. As explained in the docs, section: is used to search multiple strings that are withing the same section, not to return the whole section.