mirror of
https://github.com/kovetskiy/mark.git
synced 2025-04-24 05:42:40 +08:00
add optional spaces in regexps
This commit is contained in:
parent
de2c876632
commit
4cfda3afc1
@ -16,7 +16,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
reIncludeDirective = regexp.MustCompile(`(?s)<!-- Include: (\S+)(.*?)-->`)
|
reIncludeDirective = regexp.MustCompile(
|
||||||
|
`(?s)<!--\s*Include:\s*(\S+)(.*?)-->`,
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
func LoadTemplate(
|
func LoadTemplate(
|
||||||
|
@ -14,7 +14,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var reMacroDirective = regexp.MustCompile(
|
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 {
|
type Macro struct {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user