Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
docs: evaluate only scripts with type text/javascript
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtajina committed Feb 28, 2012
1 parent 5b0d068 commit d1558d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/src/templates/doc_widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 '';
}),
Expand Down

0 comments on commit d1558d7

Please sign in to comment.