Skip to content

Commit

Permalink
fix documentation problems
Browse files Browse the repository at this point in the history
  • Loading branch information
seletskiy committed Aug 8, 2019
1 parent 58f4a55 commit de2c876
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:

Expand Down
10 changes: 8 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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> -->
Expand All @@ -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:
Expand Down

0 comments on commit de2c876

Please sign in to comment.