Skip to content

Commit 1192f25

Browse files
committed
feedback: use left instead of default
1 parent 8f00a26 commit 1192f25

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

android/src/main/java/com/swmansion/enriched/markdown/spans/BlockquoteSpan.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class BlockquoteSpan(
8787
lineNum: Int,
8888
) {
8989
if (shouldSkipDrawing(text, start)) return
90-
drawBackground(canvas, top, bottom, right)
90+
drawBackground(canvas, left, top, bottom, right)
9191
}
9292

9393
@SuppressLint("WrongConstant") // Result of mask is always valid: 0, 1, 2, or 3
@@ -140,12 +140,13 @@ class BlockquoteSpan(
140140

141141
private fun drawBackground(
142142
c: Canvas,
143+
left: Int,
143144
top: Int,
144145
bottom: Int,
145146
right: Int,
146147
) {
147148
val bgColor = blockquoteStyle.backgroundColor?.takeIf { it != Color.TRANSPARENT } ?: return
148149
val backgroundPaint = configureBackgroundPaint(bgColor)
149-
c.drawRect(0f, top.toFloat(), right.toFloat(), bottom.toFloat(), backgroundPaint)
150+
c.drawRect(left.toFloat(), top.toFloat(), right.toFloat(), bottom.toFloat(), backgroundPaint)
150151
}
151152
}

android/src/main/java/com/swmansion/enriched/markdown/utils/text/span/SpanFlags.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ const val SPAN_FLAGS_EXCLUSIVE_EXCLUSIVE = SpannableString.SPAN_EXCLUSIVE_EXCLUS
1414
* [BlockquoteSpan]) that must sit under inline pill/chip backgrounds.
1515
*/
1616
const val SPAN_FLAGS_CONTAINER_BACKGROUND =
17-
SpannableString.SPAN_EXCLUSIVE_EXCLUSIVE or ((0xFF) shl Spanned.SPAN_PRIORITY_SHIFT)
17+
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE or Spanned.SPAN_PRIORITY

0 commit comments

Comments
 (0)