fix documentation problems

This commit is contained in:
Stanislav Seletskiy 2019-08-08 15:17:44 +03:00
parent 58f4a55100
commit de2c876632
No known key found for this signature in database
GPG Key ID: E6B40F71C367E6B5
2 changed files with 19 additions and 5 deletions

View File

@ -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:
<yaml-data> -->
```
Capture groups can be defined in the macro's `<regexp>` which can be later
referenced in the `<yaml-data>` using `${<number>}` syntax.
Capture groups can be defined in the macro's <regexp> which can be later
referenced in the `<yaml-data>` using `${<number>}` syntax, where `<number>` is
number of a capture group in regexp (`${0}` is used for entire regexp match),
for example:
```markdown
<!-- Macro: MYJIRA-\d+
Template: ac:jira:ticket
Ticket: ${0} -->
```
By default, mark provides several built-in templates and macros:

10
main.go
View File

@ -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.:
<!-- Include: <path> -->
@ -76,7 +76,13 @@ be replaced with specified template:
<yaml-data> -->
Capture groups can be defined in the macro's <regexp> which can be later
referenced in the <yaml-data> using ${<number>} syntax.
referenced in the <yaml-data> using ${<number>} syntax, where <number> is
number of a capture group in regexp (${0} is used for entire regexp match), for
example:
<!-- Macro: MYJIRA-\d+
Template: ac:jira:ticket
Ticket: ${0} -->
By default, mark provides several built-in templates and macros: