From 99119d8aff6a1d220ee41ba4061bd6844ea53dac Mon Sep 17 00:00:00 2001 From: Leandro Carneiro Date: Tue, 20 Apr 2021 15:35:17 -0300 Subject: [PATCH] feat(macro): Add emoticon support --- README.md | 27 ++++++++++++++++++++++++++- pkg/mark/stdlib/stdlib.go | 6 ++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 55366cb..9ba875e 100644 --- a/README.md +++ b/README.md @@ -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 @@ -427,4 +452,4 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d -This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! \ No newline at end of file +This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! diff --git a/pkg/mark/stdlib/stdlib.go b/pkg/mark/stdlib/stdlib.go index 96a079d..34172f0 100644 --- a/pkg/mark/stdlib/stdlib.go +++ b/pkg/mark/stdlib/stdlib.go @@ -172,6 +172,12 @@ func templates(api *confluence.API) (*template.Template, error) { `{{printf "\n"}}`, ), + /* https://confluence.atlassian.com/doc/confluence-storage-format-790796544.html */ + + `ac:emoticon`: text( + ``, + ), + // TODO(seletskiy): more templates here } { templates, err = templates.New(name).Parse(body)