Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ac:box FATAL unable to load template #81

Open
kneufeld-pbp opened this issue Mar 30, 2021 · 2 comments
Open

ac:box FATAL unable to load template #81

kneufeld-pbp opened this issue Mar 30, 2021 · 2 comments

Comments

@kneufeld-pbp
Copy link

I am experiencing an issue when using the macro comment-markup for ac:box.

mark --version: 5.5

Sample.md

<!-- Space: Test -->
<!-- Parent: Test Parent -->
<!-- Title: Sample -->
<!-- Macro: :box:(.+):(.*):(.+):
     Template: ac:box
     Icon: true
     Name: ${1}
     Title: ${2}
     Body: ${3} -->

:box:info::Foobar:
:box:tip:Tip of day:Foobar:
:box:note::Foobar:
:box:warning:Alert!:Foobar:

Output:

mark -f "./sample.md" --drop-h1 --dry-run
2021-03-30 10:43:25.208 FATAL unable to load template
                              └─ unable to read template file
                                 ├─ open ac:box: no such file or directory
                                 └─ name: ac:box

Debug flag gives me the same output as above.

@rofafor
Copy link
Contributor

rofafor commented Mar 30, 2021

Your example works nicely with Confluence 7.4.1 server and mark 5.5 Darwin binary downloaded from the releases page.

However, I'd suggest to change the readme example a bit as the current regexp doesn't handle nicely e.g. hyperlinks:

<!-- Macro: :box::(.+)::(.*)::(.+)::
    Template: ac:box
    Icon: true
    Name: ${1}
    Title: ${2}
    Body: ${3} -->

@kneufeld-pbp
Copy link
Author

@rofafor thanks for the macro update. It works great.

<!-- Space: Test -->
<!-- Parent: Test Parent -->
<!-- Title: Sample -->
<!-- Macro: :box::(.+)::(.*)::(.+)::
    Template: ac:box
    Icon: true
    Name: ${1}
    Title: ${2}
    Body: ${3} -->

:box::info::::Foobar::

Output:

<p><ac:structured-macro ac:name="info">
<ac:parameter ac:name="icon">true</ac:parameter>
<ac:parameter ac:name="title"></ac:parameter>
<ac:rich-text-body>
Foobar
</ac:rich-text-body>
</ac:structured-macro></p>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants