Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Uncaught TypeError: Cannot read property 'getAttribute' of null #84

PhilG opened this Issue · 0 comments

1 participant


This is what I get when using Rainbow in my actual project. I'm not using the data-language attribute but classes, and I think there is the problem.

Except for this error it's working very well! Maybe you should add a try..catch block around the problematic function, not really sure.

Uncaught TypeError: Cannot read property 'getAttribute' of null rainbow.js:101
_attr rainbow.js:101
_getLanguageForBlock rainbow.js:150
_highlightCodeBlock rainbow.js:619
_highlightCodeBlock rainbow.js:644
_highlightCodeBlock rainbow.js:644
_highlightCodeBlock rainbow.js:644
_highlightCodeBlock rainbow.js:644
_highlightCodeBlock rainbow.js:644
(anonymous function)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.