mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-21 17:00:24 +00:00
docs: evaluate only scripts with type text/javascript
This commit is contained in:
parent
5b0d068358
commit
d1558d7924
1 changed files with 1 additions and 1 deletions
|
|
@ -33,7 +33,7 @@ angular.module('ngdocs.directives', [], function($compileProvider) {
|
|||
//jqlite instead. jqlite's find() method currently supports onlt getElementsByTagName!
|
||||
var example = element.find('pre').eq(0), //doc-source
|
||||
scriptSrc = '',
|
||||
htmlSrc = example.text().replace(/<script[^\>]*>([\s\S]+)<\/script>/im, function(_, script) {
|
||||
htmlSrc = example.text().replace(/<script(\s+type="text\/javascript")?>([\s\S]+)<\/script>/im, function(_, type, script) {
|
||||
scriptSrc = script;
|
||||
return '';
|
||||
}),
|
||||
|
|
|
|||
Loading…
Reference in a new issue