nbsphinx
nbsphinx copied to clipboard
Markdown headers rendered incorrectly
#315 #164 nbsphinx 0.4.2 pandoc 2.7.1
## H2
#### H4
results in h3 headers for both in HTML.
Ipynb with rendered html Archive.zip
Thanks for the report!
It looks like all headers are turned into h3
, regardless of their actual level.
In fact, they are set to one level deeper than the surrounding level.
I have no idea why this happens, but I guess it happens in sphinx.util.nodes.nested_parse_with_titles()
.
I don't know if that's expected behavior or a bug in Sphinx.
I might also have used the function wrong.
See #152 and #153.
Hi, there. I faced the similar problem and have solved it.
The cause of the problem I faced was that some header's level were NOT increasing consecutively as follows.
# Title
### sub-title
* xxx
When I improved all header to consecutively increase in the notebook as follows, the problem was eliminated.
# Title
## sub-title
* xxx
I don't know whether this is the problem or the known specification of nbsphinx or sphinx. I'm sorry to bother you guys, if the problem I written above is NOT related to yours.
Thanks!