add optional spaces in regexps

This commit is contained in:
Stanislav Seletskiy
2019-08-08 15:32:34 +03:00
parent de2c876632
commit 4cfda3afc1
2 changed files with 4 additions and 2 deletions

View File

@@ -14,7 +14,7 @@ import (
)
var reMacroDirective = regexp.MustCompile(
`(?s)<!-- Macro: ([^\n]+)\n\s*Template: (\S+)\n(.*?)-->`,
`(?s)<!--\s*Macro:\s*([^\n]+)\n\s*Template:\s*(\S+)\n(.*?)-->`,
)
type Macro struct {