Skip to content

Commit b48ccaf

Browse files
committed
- Cleanup code
1 parent f460cf6 commit b48ccaf

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

multiplatform-markdown-renderer/src/commonMain/kotlin/com/mikepenz/markdown/compose/elements/MarkdownCode.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
package com.mikepenz.markdown.compose.elements
22

3-
import androidx.compose.foundation.*
3+
import androidx.compose.foundation.BorderStroke
4+
import androidx.compose.foundation.background
5+
import androidx.compose.foundation.border
6+
import androidx.compose.foundation.horizontalScroll
47
import androidx.compose.foundation.layout.Box
58
import androidx.compose.foundation.layout.fillMaxWidth
69
import androidx.compose.foundation.layout.padding
10+
import androidx.compose.foundation.rememberScrollState
711
import androidx.compose.foundation.shape.RoundedCornerShape
812
import androidx.compose.runtime.Composable
913
import androidx.compose.ui.Modifier

multiplatform-markdown-renderer/src/commonMain/kotlin/com/mikepenz/markdown/compose/elements/MarkdownText.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,10 @@ fun MarkdownText(
9090
}
9191

9292
// forward the `onTextLayout` to `extended-spans` if provided
93-
val onTextLayout: ((TextLayoutResult, Color?) -> Unit)? = if (extendedSpans != null) {
93+
val onTextLayout: ((TextLayoutResult, Color?) -> Unit)? = extendedSpans?.let {
9494
{ layoutResult, color ->
9595
extendedSpans.onTextLayout(layoutResult, color)
9696
}
97-
} else {
98-
null
9997
}
10098

10199
// call drawBehind with the `extended-spans` if provided

0 commit comments

Comments
 (0)