mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-09 22:04:34 -05:00
Switch to a new Ktlint Formatter (#705)
* Switch to new Ktlint plugin * Add ktlintCheck to PR builds * Run formatter * Put ktlint version in libs toml * Fix lint * Use Zip4Java from libs.toml
This commit is contained in:
@@ -5,11 +5,17 @@ import org.jsoup.Jsoup
|
||||
import org.jsoup.nodes.Document
|
||||
import org.jsoup.nodes.Element
|
||||
|
||||
fun Element.selectText(css: String, defaultValue: String? = null): String? {
|
||||
fun Element.selectText(
|
||||
css: String,
|
||||
defaultValue: String? = null,
|
||||
): String? {
|
||||
return select(css).first()?.text() ?: defaultValue
|
||||
}
|
||||
|
||||
fun Element.selectInt(css: String, defaultValue: Int = 0): Int {
|
||||
fun Element.selectInt(
|
||||
css: String,
|
||||
defaultValue: Int = 0,
|
||||
): Int {
|
||||
return select(css).first()?.text()?.toInt() ?: defaultValue
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user