深入理解Hugo: Template Parser

package main
import (
    "fmt"
    "github.com/sunwei/gobyexample/modules/template/parser"
)
func main() {
    d, err := parser.Parse("example",
        "<p><!-- HTML comment -->abc</p>\n{{.Content}}")
    if err != nil {
        fmt.Println(err)
        return
    }
    fmt.Println(d.String())
}

output

EOF State
<p><!-- HTML comment -->abc</p>
.Content
Program exited.

Next example: Template Escaper.