mirror of
https://github.com/kovetskiy/mark.git
synced 2026-05-01 21:02:33 +00:00
feat: Add fallback directory to load includes from
This commit is contained in:
@@ -106,6 +106,7 @@ func (macro *Macro) configure(node interface{}, groups [][]byte) interface{} {
|
||||
|
||||
func ExtractMacros(
|
||||
base string,
|
||||
includePath string,
|
||||
contents []byte,
|
||||
templates *template.Template,
|
||||
) ([]Macro, []byte, error) {
|
||||
@@ -167,7 +168,7 @@ func ExtractMacros(
|
||||
return nil
|
||||
}
|
||||
} else {
|
||||
macro.Template, err = includes.LoadTemplate(base, template, "{{", "}}", templates)
|
||||
macro.Template, err = includes.LoadTemplate(base, includePath, template, "{{", "}}", templates)
|
||||
if err != nil {
|
||||
err = karma.Format(err, "unable to load template")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user