Skip to content

Commit

Permalink
Simplified a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
cooltey committed Nov 15, 2023
1 parent 7dd62df commit da89db6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ class CustomHtmlParser constructor(private val handler: TagHandler) : TagHandler
private fun handleListTag(output: Editable) {
if (listParents.last() == "ol") {
listItemCount++
val split = output.toString().split("\n").filter { it.isNotEmpty() }
val split = output.split("\n").filter { it.isNotEmpty() }
val start = output.length - split.last().length - 1
val replaceStr = "$listItemCount. ${split.last()}"
output.replace(start - 1, output.length - 1, replaceStr)
Expand Down

0 comments on commit da89db6

Please sign in to comment.