Update markdown format

fix incorrect empty field
pull/1/head
Ika 2017-03-18 01:50:39 +08:00
parent e8d4ee96fa
commit 570451caad
2 changed files with 2 additions and 2 deletions

View File

@ -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;
});

View File

@ -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';
}