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