mirror of
https://github.com/kovetskiy/mark.git
synced 2026-04-24 08:12:36 +00:00
feat: Support page inclusion macro
Also generalize the ac_tag_parser a bit and support <ri:* /> tags as well
This commit is contained in:
@@ -261,6 +261,18 @@ func templates(api *confluence.API) (*template.Template, error) {
|
||||
`</ac:structured-macro>{{printf "\n"}}`,
|
||||
),
|
||||
|
||||
/* https://confluence.atlassian.com/conf59/include-page-macro-792499125.html */
|
||||
|
||||
`ac:include`: text(
|
||||
`<ac:structured-macro ac:name="include">{{printf "\n"}}`,
|
||||
`<ac:parameter ac:name="">{{printf "\n"}}`,
|
||||
`<ac:link>{{printf "\n"}}`,
|
||||
`<ri:page ri:content-title="{{ .Page }}" {{if .Space }}ri:space-key="{{ .Space }}"{{end}}/>{{printf "\n"}}`,
|
||||
`</ac:link>{{printf "\n"}}`,
|
||||
`</ac:parameter>{{printf "\n"}}`,
|
||||
`</ac:structured-macro>{{printf "\n"}}`,
|
||||
),
|
||||
|
||||
// TODO(seletskiy): more templates here
|
||||
} {
|
||||
templates, err = templates.New(name).Parse(body)
|
||||
|
||||
Reference in New Issue
Block a user