From 0d81894c396af0555f6cd9d2018911822dc1b861 Mon Sep 17 00:00:00 2001 From: Gerardo Pacheco Date: Wed, 6 Oct 2021 12:13:33 +0200 Subject: [PATCH 1/2] Feature: Add support for the mark HTML tag --- .../main/kotlin/org/wordpress/aztec/demo/MainActivity.kt | 4 +++- .../src/main/kotlin/org/wordpress/aztec/AztecTagHandler.kt | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/org/wordpress/aztec/demo/MainActivity.kt b/app/src/main/kotlin/org/wordpress/aztec/demo/MainActivity.kt index 5552e7f3b..6eae590c1 100644 --- a/app/src/main/kotlin/org/wordpress/aztec/demo/MainActivity.kt +++ b/app/src/main/kotlin/org/wordpress/aztec/demo/MainActivity.kt @@ -178,6 +178,7 @@ open class MainActivity : AppCompatActivity(), private val VIDEOPRESS = "[wpvideo OcobLTqC]" private val VIDEOPRESS_2 = "[wpvideo OcobLTqC w=640 h=400 autoplay=true html5only=true3]" private val QUOTE_RTL = "
לְצַטֵט
same quote but LTR
" + private val MARK = "

Donec ipsum dolor, tempor sed bibendum vita.

" private val EXAMPLE = IMG + @@ -211,7 +212,8 @@ open class MainActivity : AppCompatActivity(), VIDEOPRESS_2 + AUDIO + GUTENBERG_CODE_BLOCK + - QUOTE_RTL + QUOTE_RTL + + MARK private val isRunningTest: Boolean by lazy { try { diff --git a/aztec/src/main/kotlin/org/wordpress/aztec/AztecTagHandler.kt b/aztec/src/main/kotlin/org/wordpress/aztec/AztecTagHandler.kt index b491cc1a6..88f032f92 100644 --- a/aztec/src/main/kotlin/org/wordpress/aztec/AztecTagHandler.kt +++ b/aztec/src/main/kotlin/org/wordpress/aztec/AztecTagHandler.kt @@ -144,6 +144,11 @@ class AztecTagHandler(val context: Context, val plugins: List = Ar handleElement(output, opening, preformatSpan) return true } + MARK -> { + val span = createHiddenHtmlSpan(tag, AztecAttributes(attributes), nestingLevel, alignmentRendering) + handleElement(output, opening, span) + return true + } else -> { if (tag.length == 2 && Character.toLowerCase(tag[0]) == 'h' && tag[1] >= '1' && tag[1] <= '6') { handleElement(output, opening, createHeadingSpan(nestingLevel, tag, AztecAttributes(attributes), alignmentRendering)) @@ -245,5 +250,6 @@ class AztecTagHandler(val context: Context, val plugins: List = Ar private val VIDEO = "video" private val AUDIO = "audio" private val LINE = "hr" + private val MARK = "mark" } } From c4e3f53a2ec248ee35fb6f63ab98efffee20549d Mon Sep 17 00:00:00 2001 From: Oguz Kocer Date: Thu, 14 Oct 2021 13:22:35 -0400 Subject: [PATCH 2/2] Update targetSdkVersion to 30 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 154321d63..93b30f2af 100644 --- a/build.gradle +++ b/build.gradle @@ -11,7 +11,7 @@ buildscript { jSoupVersion = '1.11.3' wordpressUtilsVersion = '1.21' espressoVersion = '3.0.1' - commonTargetSdkVersion = 29 + commonTargetSdkVersion = 30 } }