 
         jsCode += (requiresStr + code + '\n')
 
-    # console.log jsCode
-
-    # return callback($.html()) if !jsCode
-    return $.html() if !jsCode
     return $.html() + "#{scriptsStr}\n<script data-js-code>#{jsCode}</script>"
 
   ##


          ss = $('.output-div > script', $codeChunk)
          if ss
            # load d3.min.js and mpld3.min.js
            ###
            requires = options.require or []
            requires.push(path.resolve(__dirname, '../dependencies/mpld3/d3.v3.min.js'))
            requires.push(path.resolve(__dirname, '../dependencies/mpld3/mpld3.v0.3.min.js'))
            options.require = requires
            ###

            for s in ss
              $s = $(s)
              c = $s.html()

      outputDiv = @codeChunksData[id]?.outputDiv
      outputElement = @codeChunksData[id]?.outputElement

      if outputDiv # append outputDiv result
        $codeChunk.append("<div class=\"output-div\">#{outputDiv.innerHTML}</div>")
        if options.matplotlib or options.mpl
          # remove innerHTML of <div id="fig_..."></div>
          # this is for fixing mpld3 exporting issue.
          gs = $('.output-div > div', $codeChunk)
          if gs
            for g in gs
