File tree Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -249,7 +249,10 @@ def _iterate_elements( # noqa: C901
249249
250250 # Iterates over all elements in the AST
251251 # Check for different element types and process relevant details
252- if isinstance (element , marko .block .Heading ) and len (element .children ) > 0 :
252+ if (
253+ isinstance (element , marko .block .Heading )
254+ or isinstance (element , marko .block .SetextHeading )
255+ ) and len (element .children ) > 0 :
253256 self ._close_table (doc )
254257 _log .debug (
255258 f" - Heading level { element .level } , content: { element .children [0 ].children } " # type: ignore
Original file line number Diff line number Diff line change @@ -16,6 +16,14 @@ Heading:
1616
1717Empty heading:
1818
19+ Setext heading level 1:
20+
21+ # my setext heading level 1
22+
23+ Setext heading level 2:
24+
25+ ## my setext heading level 2
26+
1927Indented code block:
2028
2129```
Original file line number Diff line number Diff line change @@ -22,6 +22,16 @@ Empty heading:
2222
2323#
2424
25+ Setext heading level 1:
26+
27+ my setext heading level 1
28+ =========================
29+
30+ Setext heading level 2:
31+
32+ my setext heading level 2
33+ -------------------------
34+
2535Indented code block:
2636
2737 print("Hi!")
You can’t perform that action at this time.
0 commit comments