Skip to content

Commit

Permalink
Merge pull request #86 from carnei-ro/feat/macro/emoticon
Browse files Browse the repository at this point in the history
feat(macro): Add emoticon support
  • Loading branch information
kovetskiy authored Apr 21, 2021
2 parents 74e6714 + 99119d8 commit e1e9015
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -427,4 +452,4 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d

<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
6 changes: 6 additions & 0 deletions pkg/mark/stdlib/stdlib.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e1e9015

Please sign in to comment.