Incorporate the collapsible code block (#39)

* Incorporate the collapsible code block

* Press tilda 3 times
This commit is contained in:
Šarūnas Nejus
2020-11-30 07:46:29 +00:00
committed by GitHub
parent 27e7af5b85
commit bcf2acb39f
3 changed files with 71 additions and 6 deletions

View File

@@ -105,11 +105,12 @@ func templates(api *confluence.API) (*template.Template, error) {
// This template is used for rendering code in ```
`ac:code`: text(
`<ac:structured-macro ac:name="code">`,
`<ac:parameter ac:name="language">{{ .Language }}</ac:parameter>`,
`<ac:parameter ac:name="collapse">false</ac:parameter>`,
`<ac:plain-text-body><![CDATA[{{ .Text | cdata }}]]></ac:plain-text-body>`,
`</ac:structured-macro>`,
`<ac:structured-macro ac:name="code">{{printf "\n"}}`,
`<ac:parameter ac:name="language">{{ .Language }}</ac:parameter>{{printf "\n"}}`,
`<ac:parameter ac:name="collapse">{{ .Collapse }}</ac:parameter>{{printf "\n"}}`,
`<ac:parameter ac:name="title">{{ .Title }}</ac:parameter>{{printf "\n"}}`,
`<ac:plain-text-body><![CDATA[{{ .Text | cdata }}]]></ac:plain-text-body>{{printf "\n"}}`,
`</ac:structured-macro>{{printf "\n"}}`,
),
`ac:status`: text(