MacAlert!

Up to the minute Apple and Mac news alerts

Ink: A Pure-Swift Markdown Parser by John Sundell

[2019-11-28 10:55:54]

John Sundell: Welcome to Ink, a fast and flexible Markdown parser written in Swift. It can be used to convert Markdown-formatted strings into HTML, and also supports metadata parsing, as well as powerful customization options for fine-grained post-processing. It was built with a focus on Swift-based web development and other HTML-centered workflows. Ink is used to render all articles on swiftbysundell.com. This sort of performance is harder to achieve than you’d think: Ink was designed to be as fast and efficient as possible, to enable hundreds of full-length Markdown articles to be parsed in a matter of seconds, while still offering a fully customizable API as well. Two key characteristics make this possible: Ink aims to get as close to O(N) complexity as possible, by minimizing the amount of times it needs to read the Markdown strings that are passed to it, and by optimizing its HTML rendering to be completely linear. While true O(N) complexity is impossible to achieve when it comes to Markdown parsing, because of its very flexible syntax, the goal is to come as close to that target as possible. A high degree of memory efficiency is achieved thanks to Swift’s powerful String API, which Ink makes full use of — by using string indexes, ranges and substrings, rather than performing unnecessary string copying between its various operations. There’s some common syntax that isn’t supported (yet?), but this is already a great Markdown implementation.  ★ 

Read more....



RELATED!

Designer AirPods Cases

1Password Takes $200M Accel Investment

I Shit You Not: Disney+ Version of ‘Star Wars’ Alters the Han/Greedo Scene Again

Google Stadia Launch Seems a Little Rocky

★ 16-Inch MacBook Pro First Impressions: Great Keyboard, Outstanding Speakers

The Information: Apple Held 1,000-Person Internal Meeting Revealing Plans for 2022 AR Headset and 2023 AR Glasses

Carfection Shoots Bullitt Mustang Film Using iPhone 11 Pro

Every Horse Emoji, Ranked

Amazon Patches Ring Video Doorbell Vulnerability That Could Allow Hackers to Breach Owner’s Wi-Fi Network

Bond Film Title Anagrams

Inessential Turns 20

Nice Feature on Gus Mueller in the Mac App Store

Electron Apps Are Being Rejected From the Mac App Store for Calling Private APIs

Apple TV, Apple TV, Apple TV, and Apple TV+

Guardian Firewall