-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Pass parent to plugin.print.canAttachComment #18054
Copy link
Copy link
Labels
area:plugin apilocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.
Description
Funny story, I was looking at the Property print.
I found we are printing .value instead of .key, they I realized that .key and .value are different. It was changed many years ago.
So, for shorthand properties, the key won't get printed. If a comment gets attached to the key, it will get lost. Then I checked comment handling this function, this was added for this reason as I expected.
Similar things may happen to the new added MatchObjectPatternProperty and ComponentParameter.
To prevent comment attach to the non-printable node, we better use canAttachComment to do it, to solve the problem we need pass parent to it.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:plugin apilocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.