From 01eebda0ce6dbb3d106b98046b70207cd2b5ce50 Mon Sep 17 00:00:00 2001
From: curbengh <43627182+curbengh@users.noreply.github.com>
Date: Tue, 27 Aug 2019 21:45:28 +0930
Subject: [PATCH] feat(list_tags): add Schema "keywords" and Microdata "tag"
(#3678)
* feat(list_tags): add Schema "keywords" and Microdata "tag"
http://microformats.org/wiki/rel-tag
https://schema.org/keywords
* test(list_tags): add Schema "keywords" and Microdata "tag"
---
lib/plugins/helper/list_tags.js | 6 +--
test/scripts/helpers/list_tags.js | 72 +++++++++++++++----------------
2 files changed, 39 insertions(+), 39 deletions(-)
diff --git a/lib/plugins/helper/list_tags.js b/lib/plugins/helper/list_tags.js
index a972563c58..881bfa506c 100644
--- a/lib/plugins/helper/list_tags.js
+++ b/lib/plugins/helper/list_tags.js
@@ -26,12 +26,12 @@ function listTagsHelper(tags, options) {
if (options.amount) tags = tags.limit(options.amount);
if (style === 'list') {
- result += `
`;
+ result += ``;
tags.forEach(tag => {
result += `- `;
- result += ``;
+ result += ``;
result += transform ? transform(tag.name) : tag.name;
result += '';
@@ -47,7 +47,7 @@ function listTagsHelper(tags, options) {
tags.forEach((tag, i) => {
if (i) result += separator;
- result += ``;
+ result += ``;
result += transform ? transform(tag.name) : tag.name;
if (showCount) {
diff --git a/test/scripts/helpers/list_tags.js b/test/scripts/helpers/list_tags.js
index dfb300088f..ccfce8a39b 100644
--- a/test/scripts/helpers/list_tags.js
+++ b/test/scripts/helpers/list_tags.js
@@ -36,10 +36,10 @@ describe('list_tags', () => {
const result = listTags();
result.should.eql([
- '
',
- '- bar1
',
- '- baz2
',
- '- foo1
',
+ ''
].join(''));
});
@@ -50,9 +50,9 @@ describe('list_tags', () => {
}));
result.should.eql([
- '',
- '- bar1
',
- '- baz2
',
+ ''
].join(''));
});
@@ -63,9 +63,9 @@ describe('list_tags', () => {
});
result.should.eql([
- 'bar1',
- 'baz2',
- 'foo1'
+ 'bar1',
+ 'baz2',
+ 'foo1'
].join(', '));
});
@@ -75,10 +75,10 @@ describe('list_tags', () => {
});
result.should.eql([
- '',
- '- bar
',
- '- baz
',
- '- foo
',
+ ''
].join(''));
});
@@ -89,10 +89,10 @@ describe('list_tags', () => {
});
result.should.eql([
- '',
- '- bar1
',
- '- baz2
',
- '- foo1
',
+ ''
].join(''));
});
@@ -103,10 +103,10 @@ describe('list_tags', () => {
});
result.should.eql([
- '',
- '- foo1
',
- '- bar1
',
- '- baz2
',
+ ''
].join(''));
});
@@ -117,10 +117,10 @@ describe('list_tags', () => {
});
result.should.eql([
- '',
- '- foo1
',
- '- baz2
',
- '- bar1
',
+ ''
].join(''));
});
@@ -133,10 +133,10 @@ describe('list_tags', () => {
});
result.should.eql([
- '',
- '- BAR1
',
- '- BAZ2
',
- '- FOO1
',
+ ''
].join(''));
});
@@ -148,9 +148,9 @@ describe('list_tags', () => {
});
result.should.eql([
- 'bar1',
- 'baz2',
- 'foo1'
+ 'bar1',
+ 'baz2',
+ 'foo1'
].join(''));
});
@@ -160,9 +160,9 @@ describe('list_tags', () => {
});
result.should.eql([
- '',
- '- bar1
',
- '- baz2
',
+ ''
].join(''));
});