Skip to content

Commit 6f58df6

Browse files
author
Gerardo Pacheco
authored
Merge pull request #1333 from wordpress-mobile/feature/mark-tag-support
Feature - Adds support for the Mark HTML tag
2 parents e0cb3c9 + d0af87a commit 6f58df6

File tree

7 files changed

+24
-4
lines changed

7 files changed

+24
-4
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ orbs:
66
git: wordpress-mobile/git@1.0
77

88
xcode_version: &xcode_version
9-
xcode-version: "12.1.0"
9+
xcode-version: "12.4.0"
1010

1111
iphone_test_device: &iphone_test_device
1212
device: iPhone 11
13-
ios-version: "14.1"
13+
ios-version: "14.4"
1414

1515
workflows:
1616
test_and_validate:

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.6.4

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

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
1.19.5
2+
-------
3+
* Addd support for the Mark HTML tag.
4+
15
1.19.4
26
-------
37
* Fix Carthage build for Xcode 12

Example/Example/SampleContent/content.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,3 +159,9 @@ <h3>Unsupported HTML</h3>
159159
</table>
160160

161161
<hr/>
162+
163+
<h3>Mark</h3>
164+
165+
<p>Donec ipsum dolor, <mark style="color:#ff0000">tempor sed</mark> bibendum <mark style="color:#1100ff">vita</mark>.</p>
166+
167+
<hr/>

Example/Example/SampleContent/gutenberg.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,11 @@ <h2 style="text-align:center">The WordPress of tomorrow</h2>
140140
<!-- /wp:separator -->
141141

142142
<!-- wp:latest-posts /-->
143+
144+
<!-- wp:separator -->
145+
<hr class="wp-block-separator" />
146+
<!-- /wp:separator -->
147+
148+
<!-- wp:paragraph -->
149+
<p>Donec ipsum dolor, <mark style="color:#ff0000">tempor sed</mark> bibendum <mark style="color:#1100ff">vita</mark>.</p>
150+
<!-- /wp:paragraph -->

0 commit comments

Comments
 (0)