printer/templateprinter.go
changeset 14 da2059f2fa6a
parent 0 5abace724584
child 40 ad148f60dc87
--- a/printer/templateprinter.go	Sun Apr 23 23:32:16 2017 +0200
+++ b/printer/templateprinter.go	Mon Apr 24 22:30:07 2017 +0200
@@ -26,7 +26,7 @@
 // For TemplatePrinter, the option parameter contains the template string.
 func NewPrinterTemplate(option string) (*TemplatePrinter, error) {
 	tmpl := option
-	t, err := template.New("output").Parse(tmpl)
+	t, err := template.New("output").Funcs(template.FuncMap{"fromhtml": html2string}).Parse(tmpl)
 	if err != nil {
 		return nil, err
 	}