mirror of
https://github.com/kovetskiy/mark.git
synced 2026-04-30 20:02:35 +00:00
use regexputil
This commit is contained in:
@@ -17,7 +17,12 @@ import (
|
||||
|
||||
var (
|
||||
reIncludeDirective = regexp.MustCompile(
|
||||
`(?s)<!--\s*Include:\s*(\S+)(.*?)-->`,
|
||||
// <!-- Include: <template path>
|
||||
// <optional yaml data> -->
|
||||
|
||||
`(?s)` + // dot capture newlines
|
||||
/**/ `<!--\s*Include:\s*(?P<template>\S+)\s*` +
|
||||
/* */ `(\n(?P<config>.*?))?-->`,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user