feat(macro): Add emoticon support

This commit is contained in:
Leandro Carneiro 2021-04-20 15:35:17 -03:00
parent 74e67141ba
commit 99119d8aff
2 changed files with 32 additions and 1 deletions

View File

@ -165,6 +165,31 @@ By default, mark provides several built-in templates and macros:
See: https://confluence.atlassian.com/conf59/status-macro-792499207.html
* template: `ac:emoticon` to include emoticons. Parameters:
- Name: select emoticon
- smile
- sad
- cheeky
- laugh
- wink
- thumbs-up
- thumbs-down
- information
- tick
- cross
- warning
- plus
- minus
- question
- light-on
- light-off
- yellow-star
- red-star
- green-star
- blue-star
See: https://confluence.atlassian.com/doc/confluence-storage-format-790796544.html
* macro `@{...}` to mention user by name specified in the braces.
## Template & Macros Usecases

View File

@ -172,6 +172,12 @@ func templates(api *confluence.API) (*template.Template, error) {
`</ac:structured-macro>{{printf "\n"}}`,
),
/* https://confluence.atlassian.com/doc/confluence-storage-format-790796544.html */
`ac:emoticon`: text(
`<ac:emoticon ac:name="{{ .Name }}"/>`,
),
// TODO(seletskiy): more templates here
} {
templates, err = templates.New(name).Parse(body)