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

Commit

Permalink
fix(docs): fix broken ng-docs specs
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorMinar committed Jul 2, 2012
1 parent 212f685 commit 6d9313a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/src/ngdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ Doc.prototype = {
Doc.METADATA_IGNORE.forEach(function(ignore){ keywords[ignore] = true; });

function extractWords(text) {
var tokens = text.toLowerCase().split(/[,\.\`\'\"\#\s]+/mg);
var tokens = text.toLowerCase().split(/[\.\s,`'"#]+/mg);
tokens.forEach(function(key){
var match = key.match(/^(([\$\_a-z]|ng\:)[\w\_\-]+)/);
var match = key.match(/^((ng:|[\$_a-z])[\w\-_]+)/);
if (match){
key = match[1];
if (!keywords[key]) {
Expand Down Expand Up @@ -215,7 +215,7 @@ Doc.prototype = {
var text = trim(atText.join('\n')), match;
if (atName == 'param') {
match = text.match(/^\{([^}=]+)(=)?\}\s+(([^\s=]+)|\[(\S+)=([^\]]+)\])\s+(.*)/);
// 1 12 2 34 4 5 5 6 6 3 7 7
// 1 12 2 34 4 5 5 6 6 3 7 7
if (!match) {
throw new Error("Not a valid 'param' format: " + text);
}
Expand Down Expand Up @@ -729,7 +729,7 @@ function scenarios(docs){
function metadata(docs){
var pages = [];
docs.forEach(function(doc){
var path = (doc.name || '').split(/(\.|\:)/);
var path = (doc.name || '').split(/(\.|\:\s*)/);
for ( var i = 1; i < path.length; i++) {
path.splice(i, 1);
}
Expand Down

0 comments on commit 6d9313a

Please sign in to comment.