Rmarkdown to html section divs

rmarkdown

#1

I’d like to control the divs that get created off of headers when knitting to HTML. I’ve found how to turn them off entirely (section_divs: no). What I would really like to do is to only include divs down to a certain level. In the example below, I want to keep divs around the H2s, but not create the additional div around the H3 section (id=“smaller-div-here-dont-want-a-div” below). Anyone know if that’s possible?

Example rmd

---
title: "test divs"
author: "Hannah"
date: "October 11, 2017"
output:
  html_document:
    section_divs: yes
---

## Big Header A, want a div

words charts numbers words

## Big Header B, want a div

words charts numbers words

### smaller div here, don't want a div

words charts numbers words

Resulting HTML for the body looks like:

<div id="big-header-a-want-a-div" class="section level2">
	<h2>Big Header A, want a div</h2>
	<p>words charts numbers words</p>
</div>
<div id="big-header-b-want-a-div" class="section level2">
	<h2>Big Header B, want a div</h2>
	<p>words charts numbers words</p>
	<div id="smaller-div-here-dont-want-a-div" class="section level3">
		<h3>smaller div here, don’t want a div</h3>
		<p>words charts numbers words</p>
	</div>
</div>