mdiep / MMMarkdown

An Objective-C framework for converting Markdown to HTML.
MIT License
1.25k stars 168 forks source link

Support for syntax highlighting #95

Closed adamawolf closed 8 years ago

adamawolf commented 8 years ago

Hello, I'd love to be able to use github-style syntax highlighting on fenced code blocks in MMMarkdown.

E.g.

let countInDozen: Int = 12
let sidesInTriangle: Int = 3
let lettersInEnglishAlphabet: Int = 26

vs.

let countInDozen: Int = 12
let sidesInTriangle: Int = 3
let lettersInEnglishAlphabet: Int = 26

Do you have any plans to add this feature? If not, how would you like to see it implemented were I to take this on?

mdiep commented 8 years ago

This is outside the scope of MMMarkdown. You can do this with another library after the Markdown step. Try using something like https://github.com/isagalaev/highlight.js.