mdiep / MMMarkdown

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

the codeblock from MMMarkdown cant be colored #72

Closed zixun closed 9 years ago

zixun commented 9 years ago

I find the code in codeblock from MMMarkdown can't be colored by common markdown-css file.

how can i color my code in codeblock with a css file

mdiep commented 9 years ago

You need to use a highlighter like https://github.com/isagalaev/highlight.js.

zixun commented 9 years ago

@mdiep thank you~ but how to define the code's type in codeblock by MMMarkdown. I fond the markdown code ( such as ```objective-c ) is not work. '' haven't a class = 'objective-c' property~

mdiep commented 9 years ago

Are you using MMMarkdownExtensionsFencedCodeBlocks?

zixun commented 9 years ago

@mdiep NO! I use the no extensions API.if use the MMMarkdownExtensionsFencedCodeBlocks,it's also not work

mdiep commented 9 years ago

It looks like the language field doesn't currently work if the language has a - in the name. You can use objc instead to work around this for now. But you'll still need to turn on fenced code blocks.