I have just used github pages + hexo to creat my hexo blog.However,when using code block,it didn`t work at all and I wonder how to fix it. The code in md file is:
```js
var allp=$("div p");
allp.attr("class",function(i,n){
return Number(n)+1;
});
```
```js
allp.each(function(){
console.log(this);
});
```
but in browser,what I saw is:
I have tried many ways to fix it but failed. Btw,I use the Next theme of hexo.
I guess what you need is this
{% codeblock code snippet 1 lang:js %}
var allp=$("div p");
allp.attr("class",function(i,n){
return Number(n)+1;
});
{% endcodeblock %}
{% codeblock code snippet 2 lang:js %}
allp.each(function(){
console.log(this);
});
{% endcodeblock %}
Put the above code in your md file and you'll get this.