From de2c8766329071b1e6acd13f27de3c5c767eabc9 Mon Sep 17 00:00:00 2001 From: Stanislav Seletskiy Date: Thu, 8 Aug 2019 15:17:44 +0300 Subject: [PATCH] fix documentation problems --- README.md | 14 +++++++++++--- main.go | 10 ++++++++-- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7de857c..8a3fbd7 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Also, optional following headers are supported: reading; * plain: content will fill all page; -Mark supports Go templates, which can be includes into article by using path +Mark supports Go templates, which can be included into article by using path to the template relative to current working dir, e.g.: ```markdown @@ -67,8 +67,16 @@ be replaced with specified template: --> ``` -Capture groups can be defined in the macro's `` which can be later -referenced in the `` using `${}` syntax. +Capture groups can be defined in the macro's which can be later +referenced in the `` using `${}` syntax, where `` is +number of a capture group in regexp (`${0}` is used for entire regexp match), +for example: + +```markdown + +``` By default, mark provides several built-in templates and macros: diff --git a/main.go b/main.go index 45996f2..9f83ebc 100644 --- a/main.go +++ b/main.go @@ -57,7 +57,7 @@ Also, optional following headers are supported: reading; - plain: content will fill all page; -Mark supports Go templates, which can be includes into article by using path +Mark supports Go templates, which can be included into article by using path to the template relative to current working dir, e.g.: @@ -76,7 +76,13 @@ be replaced with specified template: --> Capture groups can be defined in the macro's which can be later -referenced in the using ${} syntax. +referenced in the using ${} syntax, where is +number of a capture group in regexp (${0} is used for entire regexp match), for +example: + + By default, mark provides several built-in templates and macros: