There is 1 update.
 
 
Confluence / cid:jira-generated-image-avatar-f6c1c1c8-cc31-4620-8a97-ce6997fe1a67 CONFLUENCE-487 Open

Extraneous empty line after the beginning of a link containing a macro

 
View issue   ยท   Add comment
 

1 update

 
cid:jira-generated-image-avatar-1123839e-0d2a-4916-b07c-6ca246ef7115 Changes by Thomas Mortagne on 21/Jul/25 14:46
 
Description: The following Confluence XHTML: 
{code}
<div>
    <a href="https://perdu.com">
      <ac:structured-macro ac:name="random-macro">
        <ac:parameter ac:name="param">value</ac:parameter>
      </ac:structured-macro>
    </a>
</div>
{code}

Produces the following events (which seems correct):

{code}
beginDocument
beginGroup
beginParagraph
beginLink [Typed = [true] Type = [url] Reference = [https://perdu.com]] [false] [[shape]=[rect]]
onMacroStandalone [random-macro] [param=value]
endLink [Typed = [true] Type = [url] Reference = [https://perdu.com]] [false] [[shape]=[rect]]
endParagraph
endGroup
endDocument
{code}

But this leads to the following, which confuses XWiki's WYSIWYG editor:

{code}
(((
[[

{{random-macro param="value"/}}>>url:https://perdu.com||shape="rect"]]
)))
{code}

Expected:

{code}
(((
[[{{random-macro param="value"/}}>>url:https://perdu.com||shape="rect"]]
)))
{code}

This seems to be because the beginning of a paragraph is enforced inside the link, although the link is already in a paragraph.