![]() ![]() "# ()\n" // Convert to an attributed string let attributedString = try ? down. "\\subsection\n" // Convert to CommonMark Markdown let commonMark = try ? down. ".SS\nDown ()\n" // Convert to LaTeX let latex = try ? down. "\n\n\n \n \n Down\n \n \n\n" // Convert to groff man let man = try ? down. "Down\n" // Convert to XML let xml = try ? down. ![]() Convert to HTML let html = try ? down. Let down = Down( markdownString: "# () ") The DownView class offers a very simple way to parse a UTF-8 encoded string with Markdown and convert it to a web view that can be added to any view: The test suite includes pathological cases that bring many other Markdown parsers to a crawl (for example, thousands-deep nested bracketed text or block quotes). The library has been extensively fuzz-tested using american fuzzy lop. In our benchmarks, cmark is 10,000 times faster than the original, and on par with the very fastest available Markdown processors. Drag and drop the Down project into your workspace file, adding the framework in the embedded framework sectionĬmark can render a Markdown version of War and Peace in the blink of an eye (127 milliseconds on a ten year old laptop, vs.See Adding Package Dependencies to Your App for detailed instructions. To add Down to your project, select File → Swift Packages → Add Package Dependency and enter the GitHub URL for Down. Due to limitations in Carthage regarding platform specification, you need to define the platform with Carthage.Ĭarthage update -platform iOS Install using Swift Package Manager:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |