Add some TODOs
This commit is contained in:
parent
006a311aeb
commit
a2edaf30e1
@ -29,6 +29,8 @@ func (this *Document) Execute (output io.Writer, data ExecutionData) error {
|
|||||||
|
|
||||||
// execute into string builder
|
// execute into string builder
|
||||||
outputBuilder := strings.Builder { }
|
outputBuilder := strings.Builder { }
|
||||||
|
// TODO catch template errors here and offset their row number by the
|
||||||
|
// number of rows taken up by the front matter
|
||||||
err := this.template.Execute(&outputBuilder, data)
|
err := this.template.Execute(&outputBuilder, data)
|
||||||
if err != nil { return err }
|
if err != nil { return err }
|
||||||
|
|
||||||
|
@ -109,6 +109,8 @@ func (this *Environment) parse (name string, modTime time.Time, input io.Reader)
|
|||||||
|
|
||||||
// parse template from the body
|
// parse template from the body
|
||||||
document.template.Funcs(this.funcMap)
|
document.template.Funcs(this.funcMap)
|
||||||
|
// TODO catch template errors here and offset their row number by the
|
||||||
|
// number of rows taken up by the front matter
|
||||||
_, err = document.template.Parse(body)
|
_, err = document.template.Parse(body)
|
||||||
if err != nil { return nil, err }
|
if err != nil { return nil, err }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user