File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
aztec/src/main/kotlin/org/wordpress/aztec/spans Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -55,14 +55,14 @@ class AztecOrderedListSpan(
5555 p.color = listStyle.indicatorColor
5656 p.style = Paint .Style .FILL
5757
58- var start = if (attributes.hasAttribute(" start" ) == true ) {
58+ val start = if (attributes.hasAttribute(" start" ) == true ) {
5959 attributes.getValue(" start" ).toInt()
6060 } else {
6161 0
6262 }
6363
6464 val isReversed = attributes.hasAttribute(" reversed" )
65- var lineIndex = if (start > 0 ) {
65+ val lineIndex = if (start > 0 ) {
6666 if (isReversed) start - (getIndexOfProcessedLine(text, end) - 1 )
6767 else start + (getIndexOfProcessedLine(text, end) - 1 )
6868 } else {
@@ -71,13 +71,9 @@ class AztecOrderedListSpan(
7171 else getIndexOfProcessedLine(text, end)
7272 }
7373
74- val textToDraw = if (lineIndex > - 1 ) {
75- if (dir >= 0 ) lineIndex.toString() + " ."
74+ val textToDraw = if (dir >= 0 ) lineIndex.toString() + " ."
7675 else " ." + lineIndex.toString()
77- } else {
78- " "
79- }
80-
76+
8177 val width = p.measureText(textToDraw)
8278 maxWidth = Math .max(maxWidth, width)
8379
You can’t perform that action at this time.
0 commit comments