From 23f9896d9eb12b45e1a62d4ac05f24405cdd9743 Mon Sep 17 00:00:00 2001 From: Tw Date: Wed, 28 Oct 2015 11:29:04 +0800 Subject: [PATCH] present: don't ignore command within text scope when handling text line by line, the current line will be ignored if it may be a command line, so we should stack back this line for further parse. Fixes golang/go#11435 Change-Id: If0567c46c90d09b30e78b72f24395725b9e00ea3 Reviewed-on: https://go-review.googlesource.com/16410 Reviewed-by: Andrew Gerrand --- present/parse.go | 1 + 1 file changed, 1 insertion(+) diff --git a/present/parse.go b/present/parse.go index 449d5ed5c9..034a83cb30 100644 --- a/present/parse.go +++ b/present/parse.go @@ -362,6 +362,7 @@ func parseSections(ctx *Context, name string, lines *Lines, number []int, doc *D var l []string for ok && strings.TrimSpace(text) != "" { if text[0] == '.' { // Command breaks text block. + lines.back() break } if strings.HasPrefix(text, `\.`) { // Backslash escapes initial period.