There is 1 update.
 
 
Confluence / cid:jira-generated-image-avatar-256b6501-40a3-4a3c-b5a7-8ff4c45f72c4 CONFLUENCE-487 Closed

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

 
View issue   ·   Add comment
 

1 update

 
cid:jira-generated-image-avatar-a6437508-b987-4706-aedd-6a5907b7d78e Changes by Raphaël Jakse on 23/Jul/25 15:38
 
Description: The following Confluence XHTML: 
{code
:java }
<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 except the onMacroStandalone, which is supposed to be a onMacroInline ):

{code :java }
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
This leads to the following, which confuses XWiki's WYSIWYG editor:

{code :java }
(((
[[

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

Expected:

{code :java }
(((
[[{{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.