From a796b655cd2046c1297d800e328ed9ef58251405 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 29 Oct 2019 21:24:58 -0700 Subject: Shared.makeSections: better behavior in some corner cases. When a div surrounds multiple sections at the same level, or a section of highre level followed by one of lower level, then we just leave it as a div and create a new div for the section. Closes #5846, closes #5761. --- test/command/5846.md | 170 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 test/command/5846.md (limited to 'test/command') diff --git a/test/command/5846.md b/test/command/5846.md new file mode 100644 index 000000000..ec00074d3 --- /dev/null +++ b/test/command/5846.md @@ -0,0 +1,170 @@ +``` +% pandoc --section-divs +::: {.mydiv} +# header 1a + +one + +# header 1b + +two +::: +^D +
+
+

header 1a

+

one

+
+
+

header 1b

+

two

+
+
+``` + +``` +% pandoc --section-divs +::: mydiv +# head 1 +## head 1.1 +# head 2 +::: + +## head 2.1 +^D +
+
+

head 1

+
+

head 1.1

+
+
+
+

head 2

+
+
+
+

head 2.1

+
+``` + +``` +% pandoc --section-divs +# One +## One A +::: fence +## One B +# Two +::: +^D +
+

One

+
+

One A

+
+
+
+

One B

+
+
+

Two

+
+
+
+``` + +``` +% pandoc --section-divs +# Beginning + +::: exterior + +At first... + +::: + +In the beginning... + +::: interior + +# Middle + +So it continued... + +::: + +# Ending + +::: exterior + +And finally... + +::: +^D +
+

Beginning

+
+

At first…

+
+

In the beginning…

+
+
+

Middle

+

So it continued…

+
+
+

Ending

+
+

And finally…

+
+
+``` + +``` +% pandoc --section-divs +::: part +# One +# Two +::: +::: part +# Three +# Four +# Five +::: +::: part +# Six +# Seven +# Eight +::: +^D +
+
+

One

+
+
+

Two

+
+
+
+
+

Three

+
+
+

Four

+
+
+

Five

+
+
+
+
+

Six

+
+
+

Seven

+
+
+

Eight

+
+
+``` -- cgit v1.2.3