Skip to content

Commit

Permalink
alignment fix
Browse files Browse the repository at this point in the history
  • Loading branch information
manas-yu committed Dec 13, 2024
1 parent 72fa61f commit 93fb232
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,17 @@ class ImageTagHandler(
captionEnd,
Spannable.SPAN_PARAGRAPH
)

// Insert a newline after the caption and reset alignment.
output.append("\n")
val resetStart = output.length
output.append(" ") // Add a placeholder space for resetting alignment.
output.setSpan(
AlignmentSpan.Standard(Layout.Alignment.ALIGN_NORMAL),
resetStart,
output.length,
Spannable.SPAN_PARAGRAPH
)
} else consoleLogger.w(
"ImageTagHandler",
"Failed to parse $CUSTOM_IMG_CAPTION_ATTRIBUTE"
Expand Down

0 comments on commit 93fb232

Please sign in to comment.