Markdown class and id attributes for a blockquote

I wanted to use a <blockquote> to indicate a callout within my Markdown articles so I hacked the Markdown Extra _DoBlockQuotes_callback() function to the following:

function _DoBlockQuotes_callback($matches) {

    //add id and class details...
    $id = $class = '';
        '/\{(?:([#.][-_:a-zA-Z0-9 ]+)+)\}/',
            $bq,$matches)) {
        foreach ($matches[1] as $match) {
            if($match[0]=='#') $type = 'id';
            else $type = 'class';
            ${$type} = ' '.$type.'="'.trim($match,'.# ').'"';
        foreach ($matches[0] as $match) {
            $bq = str_replace($match,'',$bq);
    return _HashBlock(
    ) . "\n\n";

this allows me to do

>{.className}{#id}This is the blockquote

and it will generate

<blockquote id="id" class="className">
    <p>This is the blockquote</p>

This way the RSS feed will still show it as a quote but I can make the quote look a little sexier my site.