Skip to content

Commit fca1a53

Browse files
committed
hasContainerBlock should include list items
1 parent 35e0768 commit fca1a53

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Sources/MarkdownToAttributedString/MarkdownElementAttribute.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,10 @@ public extension StringAttrs {
305305

306306
// Returns true of the attrs includes a container block element.
307307
var hasContainerBlock: Bool {
308-
return hasMarkdownElementType(.orderedList) || hasMarkdownElementType(.unorderedList) || hasMarkdownElementType(.codeBlock)
308+
return hasMarkdownElementType(.orderedList)
309+
|| hasMarkdownElementType(.unorderedList)
310+
|| hasMarkdownElementType(.listItem)
311+
|| hasMarkdownElementType(.codeBlock)
309312
}
310313

311314
func markdownElementAttrForElementType(_ elementType: MarkupType) -> MarkdownElementAttribute? {

0 commit comments

Comments
 (0)