Render code blocks using a different font in Markdown

A renderLine event gets passed the CodeMirror and line objects as well as the element. How can you tell that the current line is inside of a code block given that information?