jupyter / nbconvert

Jupyter Notebook Conversion
https://nbconvert.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.73k stars 565 forks source link

All Heading Levels Converted to H2 in Asciidoc #1456

Open iyaja opened 4 years ago

iyaja commented 4 years ago

The asciidoc exporter converts all heading levels specified in markdown cells to H2.

To reproduce the issue:

  1. Install nbconvert
  2. Create notebook with markdown cells
  3. Add markdown headers with different header levels in markdown cells
  4. nbconvert --to asciidoc notebook_name.ipynb

This error can be reproduced on https://jupyter.org/try as well.

As an example, here is a notebook with multiple markdown header levels: image

Here is what it is converted to in asciidoc:

== This is a H1

== This is a H2

== This is a H3

== This is a H4

== This is a H5

== This is a H6

Nbconvert version: 6.0.7

jph00 commented 3 years ago

@willingc FYI this is also being hit by us and by @allendowney at the moment. I've tracked it down to a pandoc issue in all versions since 2.3:

image

Because nbconvert is passing one cell at a time to pandoc, it's triggering this renumbering.

cc @hamelsmu