diff --git a/.circleci/config.yml b/.circleci/config.yml index c6569b798..900eb1b0d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,11 +6,11 @@ orbs: git: wordpress-mobile/git@1.0 xcode_version: &xcode_version - xcode-version: "12.1.0" + xcode-version: "12.4.0" iphone_test_device: &iphone_test_device device: iPhone 11 - ios-version: "14.1" + ios-version: "14.4" workflows: test_and_validate: diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 000000000..2714f5313 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +2.6.4 diff --git a/Aztec/Classes/Converters/ElementsToAttributedString/Implementations/GenericElementConverter.swift b/Aztec/Classes/Converters/ElementsToAttributedString/Implementations/GenericElementConverter.swift index 80f64de3a..aca55ab0c 100644 --- a/Aztec/Classes/Converters/ElementsToAttributedString/Implementations/GenericElementConverter.swift +++ b/Aztec/Classes/Converters/ElementsToAttributedString/Implementations/GenericElementConverter.swift @@ -11,7 +11,7 @@ class GenericElementConverter: ElementConverter { /// At some point we should modify how the conversion works, so that any supported element never goes through this /// converter at all, and this converter is turned into an `UnsupportedElementConverter()` exclusively. /// - 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] + 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] // MARK: - Built-in formatter instances diff --git a/Aztec/Classes/Libxml2/DOM/Data/Element.swift b/Aztec/Classes/Libxml2/DOM/Data/Element.swift index 308f73d35..610ba6e9d 100644 --- a/Aztec/Classes/Libxml2/DOM/Data/Element.swift +++ b/Aztec/Classes/Libxml2/DOM/Data/Element.swift @@ -30,7 +30,7 @@ public struct Element: RawRepresentable, Hashable { public static var mergeableBlockLevelElements = Set([.blockquote, .div, .figure, .figcaption, .h1, .h2, .h3, .h4, .h5, .h6, .hr, .li, .ol, .ul, .p, .pre]) /// List of style HTML elements that can be merged together when they are sibling to each other - public static var mergeableStyleElements = Set([.i, .em, .b, .strong, .strike, .u, .code, .cite, .a, .sup, .sub]) + public static var mergeableStyleElements = Set([.i, .em, .b, .strong, .strike, .u, .code, .cite, .a, .sup, .sub, .mark]) /// List of block level elements that can be merged but only when they have a single children that is also mergeable /// @@ -121,6 +121,7 @@ extension Element { public static let video = Element("video") public static let wbr = Element("wbr") public static let body = Element("body") + public static let mark = Element("mark") } diff --git a/CHANGELOG.md b/CHANGELOG.md index ec6389e0a..2797701a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +1.19.5 +------- +* Addd support for the Mark HTML tag. + 1.19.4 ------- * Fix Carthage build for Xcode 12 diff --git a/Example/Example/SampleContent/content.html b/Example/Example/SampleContent/content.html index f2fe34588..3d5b715ba 100644 --- a/Example/Example/SampleContent/content.html +++ b/Example/Example/SampleContent/content.html @@ -159,3 +159,9 @@

Unsupported HTML


+ +

Mark

+ +

Donec ipsum dolor, tempor sed bibendum vita.

+ +
diff --git a/Example/Example/SampleContent/gutenberg.html b/Example/Example/SampleContent/gutenberg.html index 772dbed27..edf1e78f9 100644 --- a/Example/Example/SampleContent/gutenberg.html +++ b/Example/Example/SampleContent/gutenberg.html @@ -140,3 +140,11 @@

The WordPress of tomorrow

+ + +
+ + + +

Donec ipsum dolor, tempor sed bibendum vita.

+ \ No newline at end of file