Skip to content

Commit

Permalink
Fixed greedy expressions in parameter parser. Fixes apm#4
Browse files Browse the repository at this point in the history
  • Loading branch information
apm committed Oct 7, 2011
1 parent 399ecfa commit 5344f86
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/docparser.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ YUI.add('docparser', function(Y) {
*/
stringlog = function(data) {
var line, file;

if (data.file && data.line) {
file = data.file;
line = data.line;
Expand Down Expand Up @@ -80,9 +80,9 @@ YUI.add('docparser', function(Y) {
CURRENT_FILE = 'currentfile',
CURRENT_CLASS = 'currentclass',

REGEX_TYPE = /(.*)\{(.*)\}(.*)/,
REGEX_TYPE = /(.*?)\{(.*?)\}(.*)/,
REGEX_FIRSTWORD = /^\s*?([^\s]+)(.*)/,
REGEX_OPTIONAL = /\[(.*)\]/,
REGEX_OPTIONAL = /\[(.*?)\]/,
REGEX_START_COMMENT = /^\s*\/\*\*/,
REGEX_END_COMMENT = /\*\/\s*$/,
REGEX_LINES = /\r\n|\n/,
Expand Down Expand Up @@ -769,7 +769,7 @@ Y.log('param name/type/descript missing: ' + stringlog(block), 'warn', 'docparse
this.set(MAIN_MODULE, '');
var clazz = this.classes[this.get(CURRENT_CLASS)];
if (clazz) {
//Handles case where @module comes after @class in a new directory of files
//Handles case where @module comes after @class in a new directory of files
if (clazz.module !== val) {
if (this.modules[clazz.module]) {
delete this.modules[clazz.module].submodules[clazz.submodule];
Expand Down

0 comments on commit 5344f86

Please sign in to comment.