There is 1 update, 8 comments.
 
 
XWiki Rendering / cid:jira-generated-image-avatar-15741c89-9c5d-4ff3-b8e5-e5e3091d789d XRENDERING-773 Open

Final new lines are discarded from inline code macro content

 
View issue   ·   Add comment
 

1 update

 
cid:jira-generated-image-avatar-8d43d02c-e230-44ea-aa76-6f521b0158ed Changes by Thomas Mortagne on 13/Feb/25 11:04
 
Component: Syntax - xwiki/2.2
 
 

8 comments

 
cid:jira-generated-image-avatar-8d43d02c-e230-44ea-aa76-6f521b0158ed Thomas Mortagne on 13/Feb/25 11:04
 

The first and last newline of a macro content is considered formatting to ignore when parsing AFAIR, so this is not a bug but a feature.

That being said, I do understand that it feels weird in the case of an inline macro. We cannot fix that in xwiki/2.1 as it would be an API breakage, but it could be added to the list of improvement to propose in a future 2.2 syntax.

 
cid:jira-generated-image-avatar-8d43d02c-e230-44ea-aa76-6f521b0158ed Thomas Mortagne on 13/Feb/25 11:04
 
The first and last newline newlines of a macro content is are considered formatting to ignore when parsing AFAIR, so this is not a bug but a feature.

That being said, I do understand that it feels weird in the case of an inline macro. We cannot fix that in xwiki/2.1 as it would be an API breakage, but it could be added to the list of improvement to propose in a future 2.2 syntax.
 
cid:jira-generated-image-avatar-8d43d02c-e230-44ea-aa76-6f521b0158ed Thomas Mortagne on 13/Feb/25 11:05
 
The first and last newlines of a macro content are considered formatting to ignore when parsing AFAIR, so this is not a bug but a feature.

That being said, I do understand that it feels weird in the case of an inline macro. We cannot fix that in xwiki/2.1 as it would be an API breakage, but it could be added to the list of
improvement improvements to propose in a future 2.2 syntax.
 
cid:jira-generated-image-avatar-8d43d02c-e230-44ea-aa76-6f521b0158ed Thomas Mortagne on 13/Feb/25 11:06
 
The first and last newlines of a macro content are considered formatting to ignore when parsing AFAIR, so this is not a bug but a feature.

That being said, I do understand that it feels weird in the case of an inline macro. We cannot fix that in xwiki/2.1 as it would be an API breakage, but it could be added to the list of improvements to propose in a future 2.2 syntax.
 
cid:jira-generated-image-avatar-8d43d02c-e230-44ea-aa76-6f521b0158ed Thomas Mortagne on 13/Feb/25 11:06
 

Raphaël Jakse if you ended up with that result when asking the renderer to serialize a content with a newline at the end, then there is a renderer bug and that one can (and should) be fixed.

 
cid:jira-generated-image-avatar-8d43d02c-e230-44ea-aa76-6f521b0158ed Thomas Mortagne on 13/Feb/25 11:06
 
[~rjakse] if you ended up with that result when asking the renderer to serialize a content with a newline at the end, then there is a renderer bug and that one can (and should) be fixed (but better create another issue for it IMO) .
 
cid:jira-generated-image-avatar-8d43d02c-e230-44ea-aa76-6f521b0158ed Thomas Mortagne on 13/Feb/25 11:08
 
[~rjakse] if you ended up with that result when asking the renderer to serialize a content with a newline at the end, then there is a renderer bug and that one can (and should) be fixed (but better create another issue for it IMO). Unless the parser removes all new ending lines, but that would be a very wrong logic (but again one we cannot fix in xwiki/2.1 unfortunately).
 
cid:jira-generated-image-avatar-8d43d02c-e230-44ea-aa76-6f521b0158ed Thomas Mortagne on 13/Feb/25 11:08
 
[~rjakse] if you ended up with that result when asking the renderer to serialize a content with a newline at the end, then there is a renderer bug and that one can (and should) be fixed (but better create another issue for it IMO). Unless the parser removes all new ending lines, but that would be a very wrong logic not make sense (but again one we cannot fix in xwiki/2.1 unfortunately).