   text = text.replace(/^\s*<!doctype(\s+.*)?>\s*/i, '')
 
   roaster text, options, (error, html) =>
-    if error
-      callback(error)
-    else
-      html = sanitize(html)
-      html = resolveImagePaths(html, filePath)
-      html = tokenizeCodeBlocks(html)
-      callback(null, html.html().trim())
+    return callback(error) if error
+
+    defaultLanguage = if path.extname(filePath) is '.litcoffee'
+      'coffeescript'
+    else 'text'
+
+    html = sanitize(html)
+    html = resolveImagePaths(html, filePath)
+    html = tokenizeCodeBlocks(html,defaultLanguage)
+    callback(null, html.html().trim())
 
 exports.toText = (text, filePath, callback) ->
   exports.toHtml text, filePath, (error, html) ->

    preElement.remove()

  html


  html

tokenizeCodeBlocks = (html,defaultLanguage='text') ->
  html = $(html)

  if fontFamily = atom.config.get('editor.fontFamily')
