             elt.find('link').remove()
             source = elt.html()
 
-            # finally set html in the live DOM
-            @preview_content.html(source)
-
-            @localize_image_links(@preview_content)
-
-            ## this would disable clickable links...
-            #@preview.find("a").click () =>
-            #    return false
-            # Make it so preview links can be clicked, don't close SMC page.
-            @preview_content.find("a").attr("target","_blank")
-            @preview_content.find("table").addClass('table')  # bootstrap table
-
-            @preview_content.mathjax()
-
-            #@preview_content.find(".smc-html-cursor").scrollintoview()
-            #@preview_content.find(".smc-html-cursor").remove()
+            if warnings
+                @preview_content.html("<pre><code>#{warnings}</code></pre>")
+            else
+                # finally set html in the live DOM
+                @preview_content.html(source)
+
+                @localize_image_links(@preview_content)
+
+                ## this would disable clickable links...
+                #@preview.find("a").click () =>
+                #    return false
+                # Make it so preview links can be clicked, don't close SMC page.
+                @preview_content.find("a").attr("target","_blank")
+                @preview_content.find("table").addClass('table')  # bootstrap table
+
+                @preview_content.mathjax()
+
+                #@preview_content.find(".smc-html-cursor").scrollintoview()
+                #@preview_content.find(".smc-html-cursor").remove()
 
             #console.log("update_preview time=#{misc.mswalltime(t0)}ms")
             if @_update_preview_redo

            command     : required
            args        : required
            postprocess : undefined
            cb          : required   # cb(error, html, warnings)
        html = undefined
        warnings = undefined

        t0 = misc.mswalltime()
        @_update_preview_lock = true
        #console.log("update_preview")
        @to_html (err, source, warnings) =>
            @_update_preview_lock = false
            if err
                console.log("failed to render preview: #{err}")
