Skip to content

Commit ffd7b10

Browse files
author
Gerardo Pacheco
committed
Feature - Add Mark tag support
1 parent e0cb3c9 commit ffd7b10

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class GenericElementConverter: ElementConverter {
1111
/// At some point we should modify how the conversion works, so that any supported element never goes through this
1212
/// converter at all, and this converter is turned into an `UnsupportedElementConverter()` exclusively.
1313
///
14-
private static let supportedElements: [Element] = [.a, .aztecRootNode, .b, .br, .blockquote, .del, .div, .em, .figure, .figcaption, .h1, .h2, .h3, .h4, .h5, .h6, .hr, .i, .img, .li, .ol, .p, .pre, .s, .span, .strike, .strong, .u, .ul, .video, .code, .sup, .sub]
14+
private static let supportedElements: [Element] = [.a, .aztecRootNode, .b, .br, .blockquote, .del, .div, .em, .figure, .figcaption, .h1, .h2, .h3, .h4, .h5, .h6, .hr, .i, .img, .li, .ol, .p, .pre, .s, .span, .strike, .strong, .u, .ul, .video, .code, .sup, .sub, .mark]
1515

1616
// MARK: - Built-in formatter instances
1717

Aztec/Classes/Libxml2/DOM/Data/Element.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public struct Element: RawRepresentable, Hashable {
3030
public static var mergeableBlockLevelElements = Set<Element>([.blockquote, .div, .figure, .figcaption, .h1, .h2, .h3, .h4, .h5, .h6, .hr, .li, .ol, .ul, .p, .pre])
3131

3232
/// List of style HTML elements that can be merged together when they are sibling to each other
33-
public static var mergeableStyleElements = Set<Element>([.i, .em, .b, .strong, .strike, .u, .code, .cite, .a, .sup, .sub])
33+
public static var mergeableStyleElements = Set<Element>([.i, .em, .b, .strong, .strike, .u, .code, .cite, .a, .sup, .sub, .mark])
3434

3535
/// List of block level elements that can be merged but only when they have a single children that is also mergeable
3636
///
@@ -121,6 +121,7 @@ extension Element {
121121
public static let video = Element("video")
122122
public static let wbr = Element("wbr")
123123
public static let body = Element("body")
124+
public static let mark = Element("mark")
124125

125126
}
126127

0 commit comments

Comments
 (0)