mirror of
https://github.com/kovetskiy/mark.git
synced 2026-04-24 08:12:36 +00:00
Add support for mermaid via library
Implementation is largely based on: https://github.com/kovetskiy/mark/pull/167 Co-Authored-By: Manuel Rueger <manuel@rueg.eu>
This commit is contained in:
@@ -42,13 +42,13 @@ func macros(templates *template.Template) ([]macro.Macro, error) {
|
||||
|
||||
macros, _, err := macro.ExtractMacros(
|
||||
"",
|
||||
[]byte(text(
|
||||
text(
|
||||
`<!-- Macro: @\{([^}]+)\}`,
|
||||
` Template: ac:link:user`,
|
||||
` Name: ${1} -->`,
|
||||
|
||||
// TODO(seletskiy): more macros here
|
||||
)),
|
||||
),
|
||||
|
||||
templates,
|
||||
)
|
||||
@@ -218,7 +218,9 @@ func templates(api *confluence.API) (*template.Template, error) {
|
||||
`<ac:emoticon ac:name="{{ .Name }}"/>`,
|
||||
),
|
||||
`ac:image`: text(
|
||||
`<ac:image {{ if .Width}}ac:width="{{ .Width }}"{{end}}><ri:attachment ri:filename="{{ .Attachment | convertAttachment }}"/></ac:image>`,
|
||||
`<ac:image{{ if .Width}} ac:width="{{ .Width }}"{{end}}{{ if .Height }} ac:height="{{ .Height }}"{{end}}{{ if .Title }} ac:title="{{ .Title }}"{{end}}>{{printf "\n"}}`,
|
||||
`<ri:attachment ri:filename="{{ .Attachment | convertAttachment }}"/>{{printf "\n"}}`,
|
||||
`</ac:image>{{printf "\n"}}`,
|
||||
),
|
||||
|
||||
/* https://confluence.atlassian.com/doc/widget-connector-macro-171180449.html#WidgetConnectorMacro-YouTube */
|
||||
|
||||
Reference in New Issue
Block a user