LeaVerou/prism — pull request #397 by Thanix (2014-11-16 03:33:41+00:00)
Title: highlightAll accepting an element to query

Currently, the highlightAll function queries document for all highlightable elements, then calls highlightElement on all of them. Sometimes we may wish to do so for a specific element deeper down the DOM tree.
There is already a highlightElement function, but it exits for elements that are not immediately highlightable. The highlightAll function seems to be a good candidate for a simple generalisation.
If no element is passed, the function can default to querying document, hopefully requiring minimal changes to existing code.