diff options
author | koichik <koichik@improvement.jp> | 2011-07-03 16:46:24 +0900 |
---|---|---|
committer | koichik <koichik@improvement.jp> | 2011-07-04 22:52:44 +0900 |
commit | bcf3c7d31c56557e0b6a5b4f60a6f755d0ad4cc4 (patch) | |
tree | d32a5296215969cb11e5053bd6134a5bbbaeb21f /tools/doctool | |
parent | 3e2abd12d3534d76e480fce7a0475d228749f31d (diff) | |
download | node-new-bcf3c7d31c56557e0b6a5b4f60a6f755d0ad4cc4.tar.gz |
Fix doctool uses RegExp object as a Function
RegExp object is no longer Function.
http://code.google.com/p/v8/issues/detail?id=617
Fixes #1262.
Diffstat (limited to 'tools/doctool')
-rw-r--r-- | tools/doctool/markdown.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/doctool/markdown.js b/tools/doctool/markdown.js index 56387c1915..3caa2e2957 100644 --- a/tools/doctool/markdown.js +++ b/tools/doctool/markdown.js @@ -149,13 +149,13 @@ Markdown.prototype.split_blocks = function splitBlocks( input, startLine ) { var line_no = 1; - if ( ( m = (/^(\s*\n)/)(input) ) != null ) { + if ( ( m = /^(\s*\n)/.exec(input) ) != null ) { // skip (but count) leading blank lines line_no += count_lines( m[0] ); re.lastIndex = m[0].length; } - while ( ( m = re(input) ) != null ) { + while ( ( m = re.exec(input) ) != null ) { blocks.push( mk_block( m[1], m[2], line_no ) ); line_no += count_lines( m[0] ); } @@ -259,7 +259,7 @@ Markdown.prototype.loop_re_over_block = function( re, block, cb ) { var m, b = block.valueOf(); - while ( b.length && (m = re(b) ) != null) { + while ( b.length && (m = re.exec(b) ) != null) { b = b.substr( m[0].length ); cb.call(this, m); } @@ -456,7 +456,7 @@ Markdown.dialects.Gruber = { ret = []; while ( blocks.length > 0 ) { - if ( re( blocks[0] ) ) { + if ( re.exec( blocks[0] ) ) { var b = blocks.shift(), // Now remove that indent x = b.replace( replace, ""); @@ -493,7 +493,7 @@ Markdown.dialects.Gruber = { if ( !m ) return undefined; function make_list( m ) { - var list = bullet_list( m[2] ) + var list = bullet_list.exec( m[2] ) ? ["bulletlist"] : ["numberlist"]; |