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: