| // Copyright 2013 The Go Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| Register("iframe", parseIframe) |
| Cmd string // original command from present source |
| func (i Iframe) PresentCmd() string { return i.Cmd } |
| func (i Iframe) TemplateName() string { return "iframe" } |
| func parseIframe(ctx *Context, fileName string, lineno int, text string) (Elem, error) { |
| args := strings.Fields(text) |
| return nil, fmt.Errorf("incorrect iframe invocation: %q", text) |
| i := Iframe{Cmd: text, URL: args[1]} |
| a, err := parseArgs(fileName, lineno, args[2:]) |
| if v, ok := a[0].(int); ok { |
| if v, ok := a[1].(int); ok { |
| return nil, fmt.Errorf("incorrect iframe invocation: %q", text) |