Allows switching between the "full-width" and "fixed" page layouts.
The "fixed" layout renders the page in a narrow column. (Confluence
default)
If not configured, it defaults to "full-width".
When a macro is set in the header, only the first line will be read and then
discarded. This makes sure we keep the macro in and stop processing metadata
when we hit a macro.
Co-authored-by: Manuel Rüger <manuel@rueg.eu>
While a page with a macro is processed, having a macro leaves an unclean buffer
for further processing steps, including title extraction. The problem seems to
come from `ExtractMeta`: as it runs through the metadata, it hits the first
line of the macro but since it doesn't look like a complete Metadata (e.g.
matching either `\[\]:\s*#\s*\(([^:]+):\s*(.*)\)` or
`<!--\s*([^:]+):\s*(.*)\s*-->` in
https://github.com/kovetskiy/mark/blob/master/pkg/mark/meta.go#L37:L38, it will
break the loop in
https://github.com/kovetskiy/mark/blob/master/pkg/mark/meta.go#L61 and return
the final document as:
```
Template: ac:children
Style: h2
Excerpt: none
Page:
TestSpace:Test
Reverse: false
All: true -->
:children:
```
This then goes into `ExtractDocumentLeadingH1` which doesn't find a match for
the regex `^#[^#]\s*(.*)\s*\n`, returning an empty title since the title is not
on the first line. This commit, while it doesn't fix the unclean document,
fixes the regex to properly find the title.
Closes#214
Add support for the `ac:jiraissues` macro. By adding the template to the stdlib. Not sure if there are other places where you need to add stuff for macros. Or how I could test this locally.
This change is to compensate for an API bug in Confluence where newly
create pages end up getting a random width of either "fixed" or "full".
Fixes#173
This fixes a bug where if you used the code macro the renderer would create
an additional expand macro if the collapse option was set. This led to
the code section being collapsiable twice.
Co-authored-by: Philipp Reinke <philipp.reinke@scandio.de>