-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HTML writer: unwrap empty incremental divs
Divs are unwrapped if the only purpose of the div seems to be to control whether lists are presented incrementally on slides. Closes: #10328
- Loading branch information
Showing
2 changed files
with
62 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
Unwrap divs if they only have the `nonincremental` or `incremental` classes. | ||
|
||
``` | ||
% pandoc --incremental --from=markdown --to=revealjs | ||
## First slide | ||
::: nonincremental | ||
1. Note 1 | ||
2. Note 2 | ||
3. Note 3 | ||
::: | ||
## Second Slide | ||
1. Note 1 | ||
2. Note 2 | ||
3. Note 3 | ||
^D | ||
<section id="first-slide" class="slide level2"> | ||
<h2>First slide</h2> | ||
<ol type="1"> | ||
<li>Note 1</li> | ||
<li>Note 2</li> | ||
<li>Note 3</li> | ||
</ol> | ||
</section> | ||
<section id="second-slide" class="slide level2"> | ||
<h2>Second Slide</h2> | ||
<ol type="1"> | ||
<li class="fragment">Note 1</li> | ||
<li class="fragment">Note 2</li> | ||
<li class="fragment">Note 3</li> | ||
</ol> | ||
</section> | ||
``` |