mirror of
https://github.com/kovetskiy/mark.git
synced 2026-05-02 21:32:34 +00:00
allow templates and macros to include blanks in path (#191)
This commit is contained in:
@@ -18,7 +18,7 @@ import (
|
||||
// <!-- Include: <template path>
|
||||
// <optional yaml data> -->
|
||||
var reIncludeDirective = regexp.MustCompile(
|
||||
`(?s)<!--\s*Include:\s*(?P<template>\S+)\s*(\n(?P<config>.*?))?-->`)
|
||||
`(?s)<!--\s*Include:\s*(?P<template>.+?)\s*(\n(?P<config>.*?))?-->`)
|
||||
|
||||
func LoadTemplate(
|
||||
base string,
|
||||
|
||||
@@ -21,7 +21,7 @@ var reMacroDirective = regexp.MustCompile(
|
||||
|
||||
`(?s)` + // dot capture newlines
|
||||
/**/ `<!--\s*Macro:\s*(?P<expr>[^\n]+)\n` +
|
||||
/* */ `\s*Template:\s*(?P<template>\S+)\s*` +
|
||||
/* */ `\s*Template:\s*(?P<template>.+?)\s*` +
|
||||
/* */ `(?P<config>\n.*?)?-->`,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user