Render markdown and code into HTML within CSS styles.
Markup could be installed via Swift Package Manager. Open Xcode and go to File -> Add Packages..., search https://github.com/hengyu/Markup.git, and add the package as one of your project's dependency.
import Markup
let html = MarkupContent(HTMLBody: rawMarkdown, type: .markdown).html
webView.render(html, baseURL: MarkupContent.resourceURL)Markupuses the highlight.js to render the code files;Markupalso leverages the github-markdown-css to render markdown text in GitHub style.
Markup is released under the MIT License.