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] );
}
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);
}
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, "");
if ( !m ) return undefined;
function make_list( m ) {
- var list = bullet_list( m[2] )
+ var list = bullet_list.exec( m[2] )
? ["bulletlist"]
: ["numberlist"];