mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-15 02:18:04 -04:00
changed DocumentParser.kt
This commit is contained in:
parent
24147280c9
commit
33e90cd844
@ -51,15 +51,11 @@ public class DocumentParser(private var listener: DocumentParser.SectionsListene
|
||||
title = sectionTitle.trim()
|
||||
return
|
||||
}
|
||||
|
||||
val section = DocumentSection()
|
||||
section.title = section.title.trim();
|
||||
section.id = id;
|
||||
val character: String = element.substring(element.length - 1)
|
||||
val level = character.toIntOrNull() ?: 0
|
||||
|
||||
section.level = level
|
||||
sections.add(section)
|
||||
sections.add(DocumentSection().apply {
|
||||
this.id = id
|
||||
title = sectionTitle.trim()
|
||||
level = element.takeLast(element.length - 1).toIntOrNull() ?: 0
|
||||
})
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
|
Loading…
x
Reference in New Issue
Block a user