parent
85799aa1a5
commit
1872b03fb8
|
@ -5,11 +5,11 @@ angular.module('code', [])
|
||||||
restrict: 'E',
|
restrict: 'E',
|
||||||
terminal: true,
|
terminal: true,
|
||||||
compile: function(element) {
|
compile: function(element) {
|
||||||
var linenums = element.hasClass('linenum');// || element.parent()[0].nodeName === 'PRE';
|
var linenums = element.hasClass('linenum');
|
||||||
var match = /lang-(\S+)/.exec(element[0].className);
|
var match = /lang-(\S+)/.exec(element[0].className);
|
||||||
var lang = match && match[1];
|
var lang = match && match[1];
|
||||||
var html = element.html();
|
var html = element.html();
|
||||||
element.html(window.prettyPrintOne(html, lang, linenums));
|
element.html(window.prettyPrintOne(html, lang, linenums));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue