$(this).attr does not work
<p>With alert debug, the branch of if was executed. But the code tag that matched did not get the "data-language" attribute.</p>

<pre><code>divs.html(function (index, oldhtml) {
    var newhtml = converter.makeHtml(oldhtml);
    var pat = /\{-# CODE (.+?) #-}/i;
    $('code', newhtml).text(function (index, text) {
        var m = text.split("\n")[0].match(pat);
        if (m) {
            $(this).attr("data-language", m[1]);
        }
    });
    return newhtml;
});
</code></pre>
