This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,9 +52,9 @@ Doc.prototype = {
5252 Doc . METADATA_IGNORE . forEach ( function ( ignore ) { keywords [ ignore ] = true ; } ) ;
5353
5454 function extractWords ( text ) {
55- var tokens = text . toLowerCase ( ) . split ( / [ , \. \` \' \" \# \s ] + / mg) ;
55+ var tokens = text . toLowerCase ( ) . split ( / [ \. \s , ` ' " # ] + / mg) ;
5656 tokens . forEach ( function ( key ) {
57- var match = key . match ( / ^ ( ( [ \$ \ _a - z ] | n g \: ) [ \w \_ \- ] + ) / ) ;
57+ var match = key . match ( / ^ ( ( n g : | [ \$ _ a - z ] ) [ \w \- _ ] + ) / ) ;
5858 if ( match ) {
5959 key = match [ 1 ] ;
6060 if ( ! keywords [ key ] ) {
@@ -215,7 +215,7 @@ Doc.prototype = {
215215 var text = trim ( atText . join ( '\n' ) ) , match ;
216216 if ( atName == 'param' ) {
217217 match = text . match ( / ^ \{ ( [ ^ } = ] + ) ( = ) ? \} \s + ( ( [ ^ \s = ] + ) | \[ ( \S + ) = ( [ ^ \] ] + ) \] ) \s + ( .* ) / ) ;
218- // 1 12 2 34 4 5 5 6 6 3 7 7
218+ // 1 12 2 34 4 5 5 6 6 3 7 7
219219 if ( ! match ) {
220220 throw new Error ( "Not a valid 'param' format: " + text ) ;
221221 }
@@ -729,7 +729,7 @@ function scenarios(docs){
729729function metadata ( docs ) {
730730 var pages = [ ] ;
731731 docs . forEach ( function ( doc ) {
732- var path = ( doc . name || '' ) . split ( / ( \. | \: ) / ) ;
732+ var path = ( doc . name || '' ) . split ( / ( \. | \: \s * ) / ) ;
733733 for ( var i = 1 ; i < path . length ; i ++ ) {
734734 path . splice ( i , 1 ) ;
735735 }
You can’t perform that action at this time.
0 commit comments