What is the difference between the "block" and "line" search operators?

I’ve tried them both, and I’m unclear about the definition of block, I suppose. I seem to be getting the same results for both, not sure where they diverge.

Found this, but it didn’t mention the difference between line and block. New searching operators: line , block , section - no difference

1 Like

For me, line:() seems pretty straightforward.

Here, using line:(pineapple tattoos), I’m looking for lines that contain both pineapple and tattoos. No matches found.

If I add tattoos to the first line, I get a hit:


block:() can a bit unintuitive, I guess, at times. Is it a block or not? block:(pineapple tattoos) will return blocks that have both pineapple and tattoos.

Here, though the first line has a manual return after it, it’s still a block, so it matches.

But, if I add a blank line, it’s no longer a block. No matches.

That’s how I understand it anyway, but I seem to forget how search works every few months :sweat_smile:. Hopefully a search guru can weigh in.

2 Likes

I think I am out of slots for Feature Requests, Botched-Up Comebacks and the like, but for me:

  • Line is a sequence of characters and words that end with a carriage return and/or line break.
  • Block should be a block of text (a paragraph) that has a line break plus an empty line as separator.
  • Sections should span same-level headings (something like how “Copy link to heading” works when embedded into another note).

Luckily (for some), I don’t make the rules, especially markdown rules. :wink:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.