Use TrimMargin instead of listOf in xkcd string thrown on error (#7470)
* refactor string used to throw error in xkcd makes a minor change to code I PRd a while back refer: https://github.com/tachiyomiorg/tachiyomi-extensions/pull/6474 changed listOf to trimMargin because it looked cleaner and a more kotlin way to do it * bump versioncode for xkcd otherwise it might not update the extension
This commit is contained in:
parent
bfe4ac9efd
commit
ba1da0be4c
|
@ -5,7 +5,7 @@ ext {
|
||||||
extName = 'xkcd'
|
extName = 'xkcd'
|
||||||
pkgNameSuffix = 'en.xkcd'
|
pkgNameSuffix = 'en.xkcd'
|
||||||
extClass = '.Xkcd'
|
extClass = '.Xkcd'
|
||||||
extVersionCode = 9
|
extVersionCode = 10
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,11 +59,11 @@ class Xkcd : ParsedHttpSource() {
|
||||||
override fun pageListParse(document: Document): List<Page> {
|
override fun pageListParse(document: Document): List<Page> {
|
||||||
val titleWords: Sequence<String>
|
val titleWords: Sequence<String>
|
||||||
val altTextWords: Sequence<String>
|
val altTextWords: Sequence<String>
|
||||||
val interactiveText = listOf(
|
val interactiveText = """
|
||||||
"To experience the", "interactive version of this comic,",
|
|To experience the interactive version of this comic,
|
||||||
"open it in WebView/browser."
|
|open it in WebView/browser.
|
||||||
)
|
""".trimMargin("|")
|
||||||
.joinToString(separator = "%0A")
|
.replace("\n", "%0A")
|
||||||
.replace(" ", "%20")
|
.replace(" ", "%20")
|
||||||
|
|
||||||
// transforming filename from info.0.json isn't guaranteed to work, stick to html
|
// transforming filename from info.0.json isn't guaranteed to work, stick to html
|
||||||
|
|
Loading…
Reference in New Issue