Skip to content

Commit 594bed4

Browse files
committed
chore: apply spotless violation fixes
1 parent 78958ee commit 594bed4

File tree

3 files changed

+42
-8
lines changed

3 files changed

+42
-8
lines changed

emojify/src/main/kotlin/io/wax911/emojify/parser/EmojiParser.kt

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,17 @@ internal fun EmojiManager.htmlEncodedEmojiAt(
9393
input.indexOf(';', codePointStart + 3) // Code point must be at least 1 char in length
9494
if (codePointEnd == -1) break
9595

96-
val result = runCatching {
97-
val radix = if (input[codePointStart + 2] == 'x') 16 else 10
98-
val codePoint =
99-
input.substring(codePointStart + 2 + radix / 16, codePointEnd).toInt(radix)
100-
charsIndex += Character.toChars(codePoint, chars, charsIndex)
101-
}
96+
val result =
97+
runCatching {
98+
val radix = if (input[codePointStart + 2] == 'x') 16 else 10
99+
val codePoint =
100+
input.substring(codePointStart + 2 + radix / 16, codePointEnd).toInt(radix)
101+
charsIndex += Character.toChars(codePoint, chars, charsIndex)
102+
}
102103

103-
if (result.isFailure)
104+
if (result.isFailure) {
104105
break
106+
}
105107

106108
val foundEmoji = emojiTrie.getEmoji(chars, 0, charsIndex)
107109
if (foundEmoji != null) {
@@ -123,7 +125,7 @@ internal fun EmojiManager.htmlEncodedEmojiAt(
123125
emoji = longestEmoji,
124126
fitzpatrick = Fitzpatrick.fitzpatrickFromUnicode(longestEmoji.unicode),
125127
startIndex = codePointStart,
126-
endIndex = longestCodePointEnd
128+
endIndex = longestCodePointEnd,
127129
)
128130
}
129131

emojify/src/main/kotlin/io/wax911/emojify/parser/candidate/HtmlCandidate.kt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2025 AniTrend
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
package io.wax911.emojify.parser.candidate
218

319
import io.wax911.emojify.contract.model.IEmoji

emojify/src/main/kotlin/io/wax911/emojify/parser/candidate/contract/ICandidate.kt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2025 AniTrend
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
package io.wax911.emojify.parser.candidate.contract
218

319
import io.wax911.emojify.contract.model.IEmoji

0 commit comments

Comments
 (0)