Add subdirectories related templates (#158)

This commit is contained in:
Dreampuf
2022-02-02 18:02:01 +08:00
committed by GitHub
parent 2251e8ad8a
commit 9a4f9ff32d
4 changed files with 9 additions and 4 deletions

View File

@@ -105,6 +105,7 @@ func (macro *Macro) configure(node interface{}, groups [][]byte) interface{} {
}
func ExtractMacros(
base string,
contents []byte,
templates *template.Template,
) ([]Macro, []byte, error) {
@@ -133,7 +134,7 @@ func ExtractMacros(
macro Macro
)
macro.Template, err = includes.LoadTemplate(template, templates)
macro.Template, err = includes.LoadTemplate(base, template, templates)
if err != nil {
err = karma.Format(err, "unable to load template")