### Bug description

Probably related to #3178, an issue I am also experiencing. But subsections are being ignored in the ToC, even without child documents.

This:

```
---
title: "test"
format: html
editor: visual
toc: true
toc-location: left
toc-depth: 2
---

# heading 1

## david

## mycroft

# heading 2

## david

## mycroft
```

Produces this:


![image](https://user-images.githubusercontent.com/9537384/209853805-21f24713-d561-477f-9106-637093af3de3.png)

I am on Windows 11 running RStudio 2022.07.2 Build 576.


### 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.
2022-12-28T18:05:18Z
daranzolin
bug
closed
ToC does not include all subsections
https://github.com/quarto-dev/quarto-cli/issues/3778