Update gloss.js

This commit is contained in:
Chen, Chien-ting 2019-05-16 01:27:47 +08:00 committed by GitHub
parent 69ece72b41
commit 6330ec4dcc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,8 +38,11 @@ hexo.extend.filter.register('before_post_render', (data) => {
return data;
});
hexo.extend.tag.register('gloss', function(args, content){
var content2dArray = [];
var contentSplitted = content.split("\n");
var content2dArrayMaxLen = 0;
@ -60,10 +63,10 @@ for (var i=0; i<content2dArray.length; i++){
line_result += ("<div class=\"css-td1\">" + content2dArray[i][j] + "</div>");
}
line_result += "</div>"
line_result += "</div>";
render_result += line_result;
}
return "<div class='css-table1'>" + render_result + "</div></div></div>"},
return "<div class='css-table1'>" + render_result + "</div></div></div>" },
{ends: true});