mirror of
https://github.com/element-hq/element-android
synced 2024-11-27 03:48:12 +03:00
Fix unit test.
This commit is contained in:
parent
ab94b21807
commit
7774f69317
1 changed files with 2 additions and 1 deletions
|
@ -29,6 +29,7 @@ import io.mockk.verify
|
||||||
import io.noties.markwon.core.spans.EmphasisSpan
|
import io.noties.markwon.core.spans.EmphasisSpan
|
||||||
import io.noties.markwon.core.spans.OrderedListItemSpan
|
import io.noties.markwon.core.spans.OrderedListItemSpan
|
||||||
import io.noties.markwon.core.spans.StrongEmphasisSpan
|
import io.noties.markwon.core.spans.StrongEmphasisSpan
|
||||||
|
import me.gujun.android.span.style.CustomTypefaceSpan
|
||||||
|
|
||||||
fun Spannable.toTestSpan(): String {
|
fun Spannable.toTestSpan(): String {
|
||||||
var output = toString()
|
var output = toString()
|
||||||
|
@ -54,7 +55,7 @@ private fun Any.readTags(): SpanTags {
|
||||||
OrderedListItemSpan::class -> SpanTags("[list item]", "[/list item]")
|
OrderedListItemSpan::class -> SpanTags("[list item]", "[/list item]")
|
||||||
HtmlCodeSpan::class -> SpanTags("[code]", "[/code]")
|
HtmlCodeSpan::class -> SpanTags("[code]", "[/code]")
|
||||||
StrongEmphasisSpan::class -> SpanTags("[bold]", "[/bold]")
|
StrongEmphasisSpan::class -> SpanTags("[bold]", "[/bold]")
|
||||||
EmphasisSpan::class -> SpanTags("[italic]", "[/italic]")
|
EmphasisSpan::class, CustomTypefaceSpan::class -> SpanTags("[italic]", "[/italic]")
|
||||||
else -> throw IllegalArgumentException("Unknown ${this::class}")
|
else -> throw IllegalArgumentException("Unknown ${this::class}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue