mirror of
https://github.com/kiwix/kiwix-apple.git
synced 2025-09-27 05:49:25 -04:00
toc trim white char
This commit is contained in:
parent
49f64ca16f
commit
166bb815c6
@ -49,7 +49,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.8.1550</string>
|
||||
<string>1.8.1553</string>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<false/>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
|
@ -21,7 +21,7 @@
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.8.1550</string>
|
||||
<string>1.8.1553</string>
|
||||
<key>NSExtension</key>
|
||||
<dict>
|
||||
<key>NSExtensionMainStoryboard</key>
|
||||
|
@ -15,7 +15,7 @@ class HTMLHeading {
|
||||
init?(rawValue: [String: String]) {
|
||||
let tagName = rawValue["tagName"] ?? ""
|
||||
self.id = rawValue["id"] ?? ""
|
||||
self.textContent = rawValue["textContent"] ?? ""
|
||||
self.textContent = (rawValue["textContent"] ?? "").stringByTrimmingCharactersInSet(.whitespaceCharacterSet())
|
||||
self.tagName = tagName
|
||||
self.level = Int(tagName.stringByReplacingOccurrencesOfString("H", withString: "")) ?? -1
|
||||
|
||||
|
@ -51,8 +51,6 @@ class KiwixURLProtocol: NSURLProtocol {
|
||||
}
|
||||
|
||||
extension NSURL {
|
||||
|
||||
|
||||
class func kiwixURLWithZimFileid(id: String, contentURLString: String) -> NSURL? {
|
||||
guard let escapedContentURLString = contentURLString.stringByAddingPercentEncodingWithAllowedCharacters(.URLPathAllowedCharacterSet()) else {return nil}
|
||||
let baseURLString = "kiwix://" + id
|
||||
|
Loading…
x
Reference in New Issue
Block a user