kovetskiy / mark

Sync your markdown files with Confluence pages.
https://samizdat.dev
Apache License 2.0
1k stars 151 forks source link

Links to confluence pages with blank in title do not work #377

Closed Skeeve closed 11 months ago

Skeeve commented 11 months ago

What happened?

I want to link to a confluence page having a blank in its title: Confluence Publish on Push

So my code is (excerpt):

to accomplish a [confluence-publish on push](ac:Confluence Publish on Push).

to accomplish a [confluence-publish on push](ac:Confluence Publish on Push). to accomplish a confluence-publish on push.

What did you expect to happen?

I expected mark to generate:

<p>to accomplish a <ac:link><ri:page ri:content-title="Confluence Publish on Push"/><ac:plain-text-link-body><![CDATA[confluence-publish on push]]></ac:plain-text-link-body></ac:link>.</p>

How can we reproduce the behavior you experienced? Steps to reproduce the behavior:

  1. paste my snippet into any markdown file
  2. run mark --compile-only to view the output

Information (please complete the following information):

Logs or other output

Output generated will be:

<p>to accomplish a [confluence-publish on push](ac:Confluence Publish on Push).</p>

Additional context

Replacing the blanks with + or %20 generates a wrong link:

<p>to accomplish a <ac:link><ri:page ri:content-title="Confluence+Publish+on+Push"/><ac:plain-text-link-body><![CDATA[confluence-publish on push]]></ac:plain-text-link-body></ac:link>.</p>
Skeeve commented 11 months ago

Stupid me… It's mentioned in the README…