1 // Copyright 2013 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.
15 Register("html", parseHTML)
18 func parseHTML(ctx *Context, fileName string, lineno int, text string) (Elem, error) {
19 p := strings.Fields(text)
21 return nil, errors.New("invalid .html args")
23 name := filepath.Join(filepath.Dir(fileName), p[1])
24 b, err := ctx.ReadFile(name)
28 return HTML{text, template.HTML(b)}, nil
32 Cmd string // original command from present source
36 func (s HTML) PresentCmd() string { return s.Cmd }
37 func (s HTML) TemplateName() string { return "html" }