             content   : required
             type      : required   # 'docstring', 'source-code' -- TODO
             target    : required
-        editor = @
         element = templates.find(".salvus-codemirror-introspect")
         element.find(".salvus-codemirror-introspect-title").text(opts.target)
         element.modal()
         element.find(".salvus-codemirror-introspect-content-docstring").text('')
         element.find(".salvus-codemirror-introspect-content-source-code").text('')
-        element.data('editor',editor)
+        element.data('editor', @)
         if opts.type == 'source-code'
             CodeMirror.runMode(opts.content, 'python', element.find(".salvus-codemirror-introspect-content-source-code")[0])
         else

        end_line = start_line
    return {start_line:start_line, end_line:end_line}


templates.find(".salvus-codemirror-introspect").find("button").click () ->
    templates.find(".salvus-codemirror-introspect").modal('hide')
    element.data('editor').focus()
    element.data('editor',0)

exports.download_file = (url) ->
    iframe = $("<iframe>").addClass('hide').attr('src', url).appendTo($("body"))

###


marked = require('marked')

marked.setOptions
