From 6330ec4dcc2967e10a5300598b9593c21eab98e9 Mon Sep 17 00:00:00 2001 From: "Chen, Chien-ting" Date: Thu, 16 May 2019 01:27:47 +0800 Subject: [PATCH] Update gloss.js --- gloss.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gloss.js b/gloss.js index 510c1d2..b4be607 100644 --- a/gloss.js +++ b/gloss.js @@ -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[i][j] + ""); } - line_result += "" + line_result += ""; render_result += line_result; } - return "
" + render_result + "
"}, +return "
" + render_result + "
" }, {ends: true});