From aa02534865c8e43dcef9e218b12c8c717c837205 Mon Sep 17 00:00:00 2001
From: Misko Hevery
Date: Mon, 7 May 2012 15:19:26 -0700
Subject: bug(ie8 docs): docs now work on ie8
---
src/bootstrap/google-prettify/prettify.js | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
(limited to 'src/bootstrap/google-prettify')
diff --git a/src/bootstrap/google-prettify/prettify.js b/src/bootstrap/google-prettify/prettify.js
index c70e9524..b18fc223 100644
--- a/src/bootstrap/google-prettify/prettify.js
+++ b/src/bootstrap/google-prettify/prettify.js
@@ -1350,11 +1350,13 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[
* or the 1-indexed number of the first line in sourceCodeHtml.
*/
function prettyPrintOne(sourceCodeHtml, opt_langExtension, opt_numberLines) {
- var container = document.createElement('pre');
+ // PATCHED: http://code.google.com/p/google-code-prettify/issues/detail?id=213
+ var container = document.createElement('div');
// This could cause images to load and onload listeners to fire.
// E.g.
.
// We assume that the inner HTML is from a trusted source.
- container.innerHTML = sourceCodeHtml;
+ container.innerHTML = '
' + sourceCodeHtml + ''; + container = container.firstChild; if (opt_numberLines) { numberLines(container, opt_numberLines, true); } -- cgit v1.2.3