From 570451caad0e2a8b8efd145cdaf8702db6432cb9 Mon Sep 17 00:00:00 2001 From: Ika Date: Sat, 18 Mar 2017 01:50:39 +0800 Subject: [PATCH] Update markdown format fix incorrect empty field --- scripts/generate.js | 2 +- scripts/markdown.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/generate.js b/scripts/generate.js index aefab8b..b63af16 100644 --- a/scripts/generate.js +++ b/scripts/generate.js @@ -25,7 +25,7 @@ request.get(url, (error, response, body) => { const catalog = $(catalogElement).text(); $html.find(`#emoji-${catalog.toLowerCase()} li .name`).each((_, emojiElement) => { const emoji = $(emojiElement).text(); - emojis.push(emoji); + emojis.push(`:${emoji}:`); }); emojiTable[catalog] = emojis; }); diff --git a/scripts/markdown.js b/scripts/markdown.js index e55ed2f..60af25e 100644 --- a/scripts/markdown.js +++ b/scripts/markdown.js @@ -47,7 +47,7 @@ module.exports = class Markdown { rowEmojis.push(''); table += format(` - | [top](#table-of-contents) |${rowEmojis.map((emoji) => ` :${emoji}: | \`:${emoji}:\` `).join(' | ')}| + | [top](#table-of-contents) |${rowEmojis.map((emoji) => emoji ? ` ${emoji} | \`${emoji}\` ` : ' | ').join(' | ')}| `) + '\n'; }