1 // Copyright 2012 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
10 Register("caption", parseCaption)
14 Cmd string // original command from present source
18 func (c Caption) PresentCmd() string { return c.Cmd }
19 func (c Caption) TemplateName() string { return "caption" }
21 func parseCaption(_ *Context, _ string, _ int, text string) (Elem, error) {
22 text = strings.TrimSpace(strings.TrimPrefix(text, ".caption"))
23 return Caption{text, text}, nil