Created
          July 23, 2018 02:01 
        
      - 
      
 - 
        
Save jhoughjr/594f55bc975606551d41d2944f53842a to your computer and use it in GitHub Desktop.  
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | func docNoteRTFData(for docID:String, | |
| inApp bundleID:String) -> String { | |
| SwiftyBeaver.debug("docID is \(docID)") | |
| if bundleID != "com.apple.finder" { | |
| do { | |
| let a = ghostnotesPath() | |
| SwiftyBeaver.debug("Trying \(a)") | |
| return try TextFile(path: a ).read() | |
| } | |
| catch { | |
| SwiftyBeaver.error(error) | |
| } | |
| }else { | |
| do { | |
| let i = docID.index(of: ":")! | |
| let newDocID = String(docID.suffix(from: i)).replacingOccurrences(of: ":", | |
| with: "/") | |
| let a = ghostnotesPath() | |
| let b = (a + newDocID + " Note.rtfd/TXT.rtf").rawValue | |
| SwiftyBeaver.debug("Trying \(b)") | |
| return try TextFile(path: Path(b) ).read() | |
| } | |
| catch { | |
| SwiftyBeaver.error(error) | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
Fucking wow GitHub. Either fucking support the whole 16 bit address space of Unicode or get the fuck out. Wonder if BitBucket fully supports Unicode.