Thursday, February 27, 2020

MarkdownAttributedString

Craig Hockenberry (tweet):

This project is an Objective-C category that generates rich text by reading Markdown as the source code. It also allows you to write Markdown using attributed strings. The code only processes link and emphasis span elements in Markdown. There is experimental support for code spans.

[…]

One of the potential uses I see for this code is with localization. Putting Markdown into your .strings files will be a lot easier than juggling separate RTF files.

It’s just a pair of .h/.m files with no dependencies, and (unlike NSAttributeString’s HTML converter) it works from any thread.

3 Comments RSS · Twitter

It's 2020 and there is no single test in the repository.

Your post makes it sound like unit testing would be a logical progression following out of some kind of advancement over the last years, a notion I strongly disagree with :-)

For anyone looking for something with CommonMark support, I just published a Swift package that offers equivalent functionality here: https://github.com/mattt/CommonMarkAttributedString

Leave a Comment