2 This is the action template.
3 It determines how the formatting actions are rendered.
7 <h{{len .Number}} id="TOC_{{.FormattedNumber}}">{{.FormattedNumber}} {{.Title}}</h{{len .Number}}>
8 {{range .Elem}}{{elem $.Template .}}{{end}}
21 <div class="code"><pre>{{range .Lines}}{{.}}{{end}}</pre></div>
24 {{range $i, $l := .Lines}}{{if $i}}{{template "newline"}}
25 {{end}}{{style $l}}{{end}}
31 <div class="code{{if playable .}} playground{{end}}" {{if .Edit}}contenteditable="true" spellcheck="false"{{end}}>{{.Text}}</div>
36 <img src="{{.URL}}"{{with .Height}} height="{{.}}"{{end}}{{with .Width}} width="{{.}}"{{end}}>
42 <video {{with .Height}} height="{{.}}"{{end}}{{with .Width}} width="{{.}}"{{end}} controls>
43 <source src="{{.URL}}" type="{{.SourceType}}">
48 {{define "background"}}
49 <div class="background">
55 <iframe src="{{.URL}}"{{with .Height}} height="{{.}}"{{end}}{{with .Width}} width="{{.}}"{{end}}></iframe>
58 {{define "link"}}<p class="link"><a href="{{.URL}}" target="_blank">{{style .Label}}</a></p>{{end}}
60 {{define "html"}}{{.HTML}}{{end}}
62 {{define "caption"}}<figcaption>{{style .Text}}</figcaption>{{end}}