Add expand macro

This commit is contained in:
Manuel Rüger
2023-05-22 17:22:32 +02:00
parent 484f988f32
commit 08281712cc
2 changed files with 13 additions and 0 deletions

View File

@@ -310,6 +310,15 @@ func templates(api *confluence.API) (*template.Template, error) {
`</ac:structured-macro>{{printf "\n"}}`,
),
/* https://confluence.atlassian.com/conf59/expand-macro-792499106.html */
`ac:expand`: text(
`<ac:structured-macro ac:name="expand">{{printf "\n"}}`,
`<ac:parameter ac:name="title">{{ .Title }}</ac:parameter>{{printf "\n"}}`,
`<ac:rich-text-body>{{ .Body }}</ac:rich-text-body>{{printf "\n"}}`,
`</ac:structured-macro>`,
),
// TODO(seletskiy): more templates here
} {
templates, err = templates.New(name).Parse(body)