mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-24 03:55:49 +08:00
docs: evaluate only scripts with type text/javascript
This commit is contained in:
@@ -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 '';
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user