Skip to content

Commit

Permalink
fix: new version of marked breaks highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
qiao committed May 2, 2012
1 parent 7ea2503 commit 267941e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions public/javascripts/mdwatch.js
Expand Up @@ -34,13 +34,13 @@ var MdWatch = (function() {
// the server will respond with the colorized html,
// then replace the parent(a `pre` node) of current node with the colorized one.
$('code').each(function(idx, ele) {
if (ele.className) {
if (ele.className.indexOf('lang-') !== -1) {
$.ajax({
url: '/colorize',
type: 'post',
data: {
code: $(ele).text(),
lang: ele.className
lang: ele.className.slice(5)
},
success: function(data) {
$(ele).parent().replaceWith($(data));
Expand Down

0 comments on commit 267941e

Please sign in to comment.