Skip to content

{{< pagebreak >}} prevents heading creation unless an empty line separate it from # #12541

@p-vllnva

Description

@p-vllnva

Bug description

Possibly related to #12361.
In 1.7.23 and 1.7.24, shortcode immediately preceding a section ({{< pagebreak >}} in the example below) prevents heading creation.

If intentional, I think it should be communicated very clearly as it may break a lot of previously fine documents.

Steps to reproduce

---
title: "pagebreak did not behave like this in 1.6"
number-sections: true
---

# No problem here

{{< lipsum 2 >}}

{{< pagebreak >}}

# Still no problem here

{{< lipsum 2 >}}

{{ <pagebreak> }}
# This will not be recognized as a section

{{< lipsum 2 >}}

Actual behavior

Unless an entire empty line separates {{< pagebreak >}} from the next heading, it appears as raw text in the output.

Expected behavior

In 1.6, the headings were printed just fine in the output.

Your environment

  • Positron: 2025.04.0 build 250
  • Ubuntu 22.04

Quarto check output

Quarto 1.7.24
[✓] Checking environment information...
Quarto cache location: /home/peio/.cache/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.6.3: OK
Dart Sass version 1.85.1: OK
Deno version 1.46.3: OK
Typst version 0.13.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.7.24
Path: /opt/quarto/bin

[✓] Checking tools....................OK
TinyTeX: (external install)
Chromium: 869685

[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /home/peio/.TinyTeX/bin/x86_64-linux
Version: 2025

[✓] Checking Chrome Headless....................OK
Chrome: (not detected)

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
Version: 3.10.12
Path: /usr/bin/python3
Jupyter: (None)

  Jupyter is not available in this Python installation.
  Install with python3 -m pip install jupyter

[✓] Checking R installation...........OK
Version: 4.4.3
Path: /usr/lib/R
LibPaths:
- /home/peio/R/x86_64-pc-linux-gnu-library/4.4
- /usr/local/lib/R/site-library
- /usr/lib/R/site-library
- /usr/lib/R/library
knitr: 1.50
rmarkdown: 2.29

[✓] Checking Knitr engine render......OK

Metadata

Metadata

Assignees

No one assigned

    Labels

    lintlinting-related issuessupporta request for support

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions