### Bug description

The search bar for Quarto websites ignores code before the first section heading. 

**Reprex:**  Create a template Quarto site and adjust the `.qmd` per below so that there is `library(dplyr)`, followed by a section heading, then `library(tidyr)`. After rendering, a site search for `lib` finds `library(tidyr)` but not `library(dplyr)`.

````
---
title: "rprex"
---

This is a Quarto website.

To learn more about Quarto websites visit <https://quarto.org/docs/websites>.

```{r}
library(dplyr)
```

## Heading

```{r}
library(tidyr)
```
````
<img width="234" alt="Screenshot 2023-02-12 at 20 49 40" src="https://user-images.githubusercontent.com/32419319/218336272-f33beef2-f62e-4a60-b265-df7c6742c924.png">

RStudio Version 2022.12.0+353
Quarto v1.3.189
MacOS 13.2 (22D49)


### Checklist

- [X] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [X] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
2023-02-12T21:00:57Z
cgoo4
bug
closed
Site search results exclude code before a section heading
https://github.com/quarto-dev/quarto-cli/issues/4329