What steps will reproduce the problem?
Execute prettyPrintOne('select * from table', 'sql'):
<html>
<body>
<script language="javascript" src="prettify.js"></script>
<script language="javascript">
document.write(prettyPrintOne('select * from table', 'sql'));
</script>
</body>
</html>
What is the expected output?
The passed html string should be colored, no exception should occur
What do you see instead?
TypeError: Cannot read property 'className' of undefined
at recombineTagsAndDecorations (prettify.js:1108:37)
at applyDecorator (prettify.js:1361:7)
at prettyPrintOne (prettify.js:1374:5)
at html.html:5:18
What version are you using? On what browser?
21-Jul-2010, Chrome 7.0.536.2
Please provide any additional information below.
I guess, recombineTagsAndDecorations should not mention "sourceNode" directly
since there is no such thing as sourceNode when you are just coloring a string.
Original issue reported on code.google.com by sitnikov...@gmail.com on 3 Oct 2010 at 7:05
Original issue reported on code.google.com by
sitnikov...@gmail.com
on 3 Oct 2010 at 7:05