hakimel/reveal.js — pull request #242 by hashar (2012-11-12 15:57:56+00:00)
Title: Fix callback calling when using from a parent directory

Authors might want to use a shared reveal.js installation for all their
presentation such as:

$ ls -1 -F
20120105-how-to-use-git.html
20121101-wikimedia-scaling.html
reveal.js/
$

In this case, the plugin callbacks will not be properly initialized.

When using head.js, the callback is marked as dependending upon the loading
of a javscript. The regex is applied to the full path which would be:

reveal.js/plugin/highlight/highlight.js

The regex will thus use 'reveal.js' as a file depency instead of the
expected 'highlight.js'

The fix is quiet easy, simply make sure that we are looking for a file
that actually ends with '.js' instead of simply containing '.js'.