in assets/js/lib-markdown.js [758:778]
horizRule: function horizRule( block, next ) {
// this needs to find any hr in the block to handle abutting blocks
var m = block.match( /^(?:([\s\S]*?)\n)?[ \t]*([-_*])(?:[ \t]*\2){2,}[ \t]*(?:\n([\s\S]*))?$/ );
if ( !m )
return undefined;
var jsonml = [ [ "hr" ] ];
// if there's a leading abutting block, process it
if ( m[ 1 ] ) {
var contained = mk_block( m[ 1 ], "", block.lineNumber );
jsonml.unshift.apply( jsonml, this.toTree( contained, [] ) );
}
// if there's a trailing abutting block, stick it into next
if ( m[ 3 ] )
next.unshift( mk_block( m[ 3 ], block.trailing, block.lineNumber + 1 ) );
return jsonml;
},