kovetskiy / mark

Sync your markdown files with Confluence pages.
https://samizdat.dev
Other
988 stars 147 forks source link

Include Macros conflict with inline macros #362

Open Skeeve opened 11 months ago

Skeeve commented 11 months ago

What happened?

Inline macros and macros with Delims: none lead to a conflict.

Please find attached macroissue.md which contains the inline macro example from the README.

It also includes an SQL file macroissue.txt and since this isn't a real template Delims is set to none.

When you run the markdown file through mark, the {{ .title }} is not expanded.

It produces:

<table>
<thead><tr><th>{{ .title }}</th></tr></thead>
<tbody><tr><td>
<p>and some
content</p>
</td></tr></tbody></table>
<ac:structured-macro ac:name="code"><ac:parameter ac:name="language">SQL</ac:parameter><ac:parameter ac:name="collapse">false</ac:parameter><ac:plain-text-body><![CDATA[SELECT NOW()]]></ac:plain-text-body></ac:structured-macro>

What did you expect to happen?

{{ .title }} should have expanded to with a title.

If you remove the Delims: none, it works as expected.

How can we reproduce the behavior you experienced?

Steps to reproduce the behavior:

  1. Download the tw attached files
  2. Replace the space with something meaningful for your environment
  3. Do a dryrun
  4. Observe the output

In case this is related to specific markdown, please provide a minimal markdown example here.

Information (please complete the following information):