You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

1 lines
583 B

function editormdSupport(){$("#post-content .entry-content").addClass("editormd-html-preview");$("pre code").each(function(){var f=$(this).attr("class");var a=$(this).html().split("\n");var e='<ol class="linenums">';var c=0;for(var b=0;b<a.length;b++){e+='<li class="L'+c+'"><code class="'+f+'">'+a[b]+"</code></li>";if(++c>=10){c=0}}e+="</ol>";var d=$(this).parent("pre");d.addClass("prettyprint linenums prettyprinted");d.html(e)});$("pre ol.linenums").each(function(){var a=$(this).find("code");var b=0;$(a).each(function(){var c=$(this).width();if(c>b){b=c}});$(this).width(b)})}