From ffd7b102feaa6650750f42fddedc5c759ee49aa4 Mon Sep 17 00:00:00 2001 From: Gerardo Pacheco Date: Tue, 5 Oct 2021 16:34:03 +0200 Subject: [PATCH 1/4] Feature - Add Mark tag support --- .../Implementations/GenericElementConverter.swift | 2 +- Aztec/Classes/Libxml2/DOM/Data/Element.swift | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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") } From c051034d510657564cd00a45d3d9b10cca068494 Mon Sep 17 00:00:00 2001 From: Gerardo Pacheco Date: Tue, 5 Oct 2021 16:42:41 +0200 Subject: [PATCH 2/4] Update sample content with the mark tag --- Example/Example/SampleContent/content.html | 6 ++++++ Example/Example/SampleContent/gutenberg.html | 8 ++++++++ 2 files changed, 14 insertions(+) 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 From 88ddfde23fda1f0042aa5462811b8ce310f0cdf8 Mon Sep 17 00:00:00 2001 From: Gerardo Pacheco Date: Tue, 5 Oct 2021 16:42:49 +0200 Subject: [PATCH 3/4] Update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) 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 From d0af87a27dd1298cb64cd9bd4999d3c207521f80 Mon Sep 17 00:00:00 2001 From: Jeremy Massel <1123407+jkmassel@users.noreply.github.com> Date: Thu, 7 Oct 2021 13:36:44 -0600 Subject: [PATCH 4/4] Try fixing CI --- .circleci/config.yml | 4 ++-- .ruby-version | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 .ruby-version 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