Skip to content

Commit

Permalink
Support deprecrated align attribute for block #171
Browse files Browse the repository at this point in the history
  • Loading branch information
onizet committed Oct 22, 2024
1 parent ee0dcd7 commit e6ecabf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Html2OpenXml/Expressions/BlockElementExpression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ protected override void ComposeStyles (ParsingContext context)
};
}

var attrValue = styleAttributes!["text-align"];
JustificationValues? align = Converter.ToParagraphAlign(attrValue);
JustificationValues? align = Converter.ToParagraphAlign(styleAttributes!["text-align"]);
if (!align.HasValue) align = Converter.ToParagraphAlign(node.GetAttribute("align"));
if (align.HasValue)
{
paraProperties.Justification = new() { Val = align };
Expand Down

0 comments on commit e6ecabf

Please sign in to comment.