Permalink
Browse files

fixed table display in the index-card

  • Loading branch information...
codefine committed Mar 14, 2018
1 parent ca2bc96 commit 1cabd6466e21a8cf527e783cf7ac3338705db11e
Showing with 4 additions and 0 deletions.
  1. +4 −0 layout/_partial/index-item.ejs
@@ -23,6 +23,10 @@

<div class="post-content" id="post-content" itemprop="postContent">
<%
post.excerpt = post.excerpt.replace(/<table>(.+)<\/table>/, function(match, $1) {
$1 = $1.replace(/<br>/g, '');
return `<table>${$1}</table>`;
});
// 首页缩略图大小及路径处理
post.excerpt = post.excerpt.replace(/(img\s)(.+)(\>)/g, (match, $1, attrs, $2) => {
let [src, alt, title = '', imgClass = '' ] = attrs.split(' ');

0 comments on commit 1cabd64

Please sign in to comment.