aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--present/parse.go1
-rw-r--r--present/testdata/media.p2
2 files changed, 3 insertions, 0 deletions
diff --git a/present/parse.go b/present/parse.go
index 83405599d..4294ea5f9 100644
--- a/present/parse.go
+++ b/present/parse.go
@@ -525,6 +525,7 @@ func parseSections(ctx *Context, name, prefix string, lines *Lines, number []int
// Command breaks text block.
// Section heading breaks text block in markdown.
if text[0] == '.' || isSpeakerNote(text) {
+ lines.back()
break
}
if strings.HasPrefix(text, `\.`) { // Backslash escapes initial period.
diff --git a/present/testdata/media.p b/present/testdata/media.p
index f11970b79..ffddf9f35 100644
--- a/present/testdata/media.p
+++ b/present/testdata/media.p
@@ -2,6 +2,7 @@ Media
*
+The Gopher
.image gopher.jpg _ 100
.caption A gopher.
@@ -14,6 +15,7 @@ Media
---
<h1>Media</h1>
<section>
+<p>The Gopher</p>
<img src="gopher.jpg" width="100" alt="">
<figcaption>A gopher.</figcaption>
<iframe src="https://golang.org/"></iframe>