dlee42 / google-code-prettify

Automatically exported from code.google.com/p/google-code-prettify
Apache License 2.0
0 stars 0 forks source link

javascript error with bootstrap tab #271

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

I use prettify for source code within bootstrap tabs. 
http://www.dartflash.com/demos/performance.html

Unfortunately i got an "length is undefined" error for every tab where 
prettified source code is. I debugged the source and i was able to fix the 
problem - but i don't know the reason for it.

file: run_prettify.js
line: 963

BEFORE:
isEmbedded = style.length >= 5 && 'lang-' === style.substring(0, 5);

AFTER:
isEmbedded = typeof style != "undefined" && style.length >= 5 && 'lang-' === 
style.substring(0, 5);

It seems that in some cases the "style" is undefined. 
If i check that style is not undefined it works perfectly.

Original issue reported on code.google.com by bernhard...@gmail.com on 9 Mar 2013 at 7:31

GoogleCodeExporter commented 8 years ago
Thanks for the detailed bug report.  Do you have a code sample handy that 
causes this?

Original comment by mikesamuel@gmail.com on 26 Jun 2013 at 7:30