observablehq / framework

A static site generator for data apps, dashboards, reports, and more. Observable Framework combines JavaScript on the front-end for interactive graphics with any language on the back-end for data analysis.
https://observablehq.com/framework/
ISC License
2.13k stars 85 forks source link

H2 after H1 not showing correctly #1397

Closed rfsan closed 1 month ago

rfsan commented 1 month ago

If I create a page new-page.md and add the following content

# Main title

## Subtitle 1

## Subtitle 2

The first H2 is rendered incorrectly

image

When I add some text between the H1 and the first H2 it works as expected

image

I'm using Observable Framework version 1.8.0

mbostock commented 1 month ago

This is by design. The h2 immediately following an h1 is interpreted as a subtitle. You can place any content in between to prevent this behavior, including an empty div.