     }
     
 }
+
+
+extension Block {
+    
+    var string: String? {
+        
+        switch self {
+        case .paragraph(let string):
+            return string.string
+        default:
+            return nil
+        }
+    }
+}

            return nil
        }
    }
    
    func testExample() {
        

class MarkupParserTests: XCTestCase {
    
    func testSwiftMarkdown() {
        
        let bundle = Bundle(for: type(of: self))
        let url = bundle.url(forResource: "test.md", withExtension: "")!
        let string = try! String(contentsOf: url)
        
        let parser = MockParser()
        
        let document = parser.parse(string: string)!
        
        XCTAssertEqual(document.rawString, string)
        
        XCTAssertEqual(document.section.contents.count, 1)
        XCTAssertEqual(document.section.subsections.count, 1)
        
        let section = document.section.subsections.first!
        XCTAssertEqual(section.contents.count, 1)
        XCTAssertEqual(section.subsections.count, 5)
        XCTAssertEqual(section.subsections[2].contents.first!.string!.characters.count, 308)
    }
    
    
    func getString(block: Block) -> String? {
        
