-
Notifications
You must be signed in to change notification settings - Fork 509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Html to wml enhancements #2
base: vNext
Are you sure you want to change the base?
Html to wml enhancements #2
Conversation
@@ -2829,9 +2829,9 @@ private static XElement[] GetSpacingProperties(XElement paragraph, HtmlToWmlConv | |||
// todo should check based on display property | |||
bool numItem = paragraph.Name == XhtmlNoNamespace.li; | |||
|
|||
if (numItem && marginTopProperty.IsAuto) | |||
if (numItem && marginTopProperty != null && marginTopProperty.IsAuto) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just use
`if (numItem && marginTopProperty?.IsAuto)'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason is that numItem is 'bool', but marginTopProperty?.IsAuto is 'bool?' , so '&&' operator cannot be applied to 'bool' and 'bool?'.
Thank you for your review!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (numItem && marginTopProperty?.IsAuto == true)
beforeAutospacing = "1"; | ||
if (numItem && marginBottomProperty.IsAuto) | ||
if (numItem && marginTopProperty != null && marginBottomProperty.IsAuto) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be marginBottomProperty != null
(copy/paste issue I guess)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (numItem && marginBottomProperty?.IsAuto == true)
V next -> master
No description provided.