Fix for DFS bug with new pattern array feature

This patch implements support for the new pattern array feature in the
Prism.languages.DFS function and fixes a bug in the autolinker plugin #359.

It adds an optional parameter to the callback of Prism.languages.DFS,
which contains the type of the current object as oposed to the key in
the parent. In most cases both key and type are exactly the same. Only
if the parent is an array the key will contain the index number and the
type will contain the attribute name of the array in the parent object.
The key can be used to replace the object in the parent and the type can
be used to provide the necessary context.
I'm generally all for descriptive names, but I believe those are established convention for this kind of thing. No?

--
Sent from my iPhone. Please excuse weird typos and/or terseness.

> On 22 Sep 2014, at 09:00, Jannik Zschiesche <notifications@github.com> wrote:
> 
> In components/prism-core.js:
> 
> > @@ -96,12 +96,16 @@ var _ = self.Prism = {
> >  		},
> >  
> >  		// Traverse a language definition with Depth First Search
> > -		DFS: function(o, callback) {
> > +		DFS: function(o, callback, type) {
> >  			for (var i in o) {
> I know it's not part of this PR, but could we please update the internal variable names to something more meaningful than i and o. We now have automatic minification, so no need to make our life hard here. 
> 
> —
> Reply to this email directly or view it on GitHub.