Skip to content

Commit a23d21e

Browse files
committed
Make sure the intrinsic representation also get the list attributes.
1 parent e73f4a0 commit a23d21e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Aztec/Classes/Converters/ElementsToAttributedString/Implementations/LIElementConverter.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ class LIElementConverter: ElementConverter {
1616

1717
var intrinsicRepresentation: NSAttributedString?
1818
let intrisicRepresentationBeforeChildren = !hasNonEmptyTextChildren(node: element) && hasNestedList(node: element)
19-
if intrisicRepresentationBeforeChildren {
20-
intrinsicRepresentation = NSAttributedString(string: String(.paragraphSeparator), attributes: attributes)
21-
}
2219

2320
let elementRepresentation = HTMLElementRepresentation(element)
2421
let representation = HTMLRepresentation(for: .element(elementRepresentation))
2522
let formatter = LiFormatter(placeholderAttributes: nil)
2623
let finalAttributes = formatter.apply(to: attributes, andStore: representation)
2724

25+
if intrisicRepresentationBeforeChildren {
26+
intrinsicRepresentation = NSAttributedString(string: String(.paragraphSeparator), attributes: finalAttributes)
27+
}
2828

2929
return serialize(element, intrinsicRepresentation, finalAttributes, intrisicRepresentationBeforeChildren)
3030
}

0 commit comments

Comments
 (0)