mirror of https://github.com/golang/go.git
present: retain complete caption command when parsing captions
Updates golang/go#41883 Change-Id: I332aa821a6e414a77ff8d8cc384ba23b5955b05b Reviewed-on: https://go-review.googlesource.com/c/tools/+/260897 Run-TryBot: Ian Lance Taylor <iant@golang.org> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Trust: Cherry Zhang <cherryyz@google.com>
This commit is contained in:
parent
1aac171fc6
commit
a14ff98a4d
|
|
@ -18,7 +18,7 @@ type Caption struct {
|
|||
func (c Caption) PresentCmd() string { return c.Cmd }
|
||||
func (c Caption) TemplateName() string { return "caption" }
|
||||
|
||||
func parseCaption(_ *Context, _ string, _ int, text string) (Elem, error) {
|
||||
text = strings.TrimSpace(strings.TrimPrefix(text, ".caption"))
|
||||
return Caption{text, text}, nil
|
||||
func parseCaption(_ *Context, _ string, _ int, cmd string) (Elem, error) {
|
||||
text := strings.TrimSpace(strings.TrimPrefix(cmd, ".caption"))
|
||||
return Caption{cmd, text}, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue